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) {