Fixes for Linux kernel up to 3.16

Please pull to fix building issues caused by changes in mainline Linux kernel. This pull includes fixes for changes made up to 3.16 version of Linux. All changes are trivial and will not cause problems on older versions of the kernel.