acpi_call
acpi_call copied to clipboard
Patch for kernel 4.12.4
The uaccess.h has moved from asm to linux in Kernel 4.12, so would you like add the following patch?
-#include <asm/uaccess.h> /* copy_*_user */
+#include <linux/version.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,12,0)
+#include <asm/uaccess.h> /* copy_*_user */
+#else
+#include <linux/uaccess.h> /* copy_*_user */
+#endif
Actually, linux/uaccess.h has always existed since at least 3.10 -- and includes asm/uaccess.h.
So I think the right thing to do is to just unconditionally include <asm/uaccess.h>
-#include <asm/uaccess.h> /* copy_user / +#include <linux/uaccess.h> / copy_user */
So, is this the reason for this build failure:
error: implicit declaration of function 'copy_from_user' [-Werror=implicit-function-declaration]
if (copy_from_user( input, buff, len )) {
^~~~~~~~~~~~~~
Edit: Yeah, including linux/uaccess.h instead of asm/uaccess.h results in a successful build