summaryrefslogtreecommitdiff
path: root/system/acpi_call/fix-5.x-kernel.patch
blob: 5ed439285712c005f4e2124d6dd4db70b98bae93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- acpi_call.c.orig	2020-10-28 23:05:01.875849692 +0100
+++ acpi_call.c	2020-10-28 23:07:50.658179392 +0100
@@ -7,6 +7,7 @@
 #include <linux/slab.h>
 #include <asm/uaccess.h>
 #include <linux/acpi.h>
+#include <linux/uaccess.h>

 MODULE_LICENSE("GPL");

@@ -317,11 +318,18 @@
     return ret;
 }

+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
+static struct proc_ops proc_acpi_operations = {
+        .proc_read  = acpi_proc_read,
+        .proc_write = acpi_proc_write,
+};
+#else
 static struct file_operations proc_acpi_operations = {
         .owner    = THIS_MODULE,
         .read     = acpi_proc_read,
         .write    = acpi_proc_write,
 };
+#endif

 #else
 static int acpi_proc_read(char *page, char **start, off_t off,