From 0a0b6924a626b971339ae7f8e998476f00641875 Mon Sep 17 00:00:00 2001 From: Daniel Faria Date: Sun, 24 Jan 2016 07:56:59 -0200 Subject: [PATCH] add check to kernel version for include acpi.h --- acpi_call.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/acpi_call.c b/acpi_call.c index 3025d97..8070205 100644 --- a/acpi_call.c +++ b/acpi_call.c @@ -6,7 +6,12 @@ #include #include #include -#include + +if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0) + #include +else + #include +endif MODULE_LICENSE("GPL"); @@ -161,7 +166,7 @@ static char *parse_acpi_args(char *input, int *nargs, union acpi_object **args) // if no space is found, return 0 arguments if (*s == 0) return input; - +Ggg *args = (union acpi_object *) kmalloc(MAX_ACPI_ARGS * sizeof(union acpi_object), GFP_KERNEL); while (*s) {