I've cherry-picked the upstream fix as a patch in the gspr/bug-959364
branch of https://salsa.debian.org/gspr/acpi-call.git. It fixes the
problem for me.

A pull request for the maintainer follows.

***

The following changes since commit 8474a4b865725bedc46a1be0b30dbc2a6b2df84c:

  Update changelog for 1.1.0-5 release (2019-05-31 17:34:38 +0200)

are available in the Git repository at:

  https://salsa.debian.org/gspr/acpi-call.git 
625bdbfb2133f29c1c37ab775551e2f106459017

for you to fetch changes up to 625bdbfb2133f29c1c37ab775551e2f106459017:

  Add patch 0004-fix-for-5.6-kernels.-file_operations-dtype-is-change.patch 
(2020-05-05 09:26:30 +0200)

----------------------------------------------------------------
Gard Spreemann (1):
      Add patch 0004-fix-for-5.6-kernels.-file_operations-dtype-is-change.patch

 .../0004-fix-for-5.6-kernels.-file_operations-dtype-is-change.patch  | 31 
+++++++++++++++++++++++++++++++
 debian/patches/series                                                |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 
debian/patches/0004-fix-for-5.6-kernels.-file_operations-dtype-is-change.patch

diff --git 
a/debian/patches/0004-fix-for-5.6-kernels.-file_operations-dtype-is-change.patch
 
b/debian/patches/0004-fix-for-5.6-kernels.-file_operations-dtype-is-change.patch
new file mode 100644
index 0000000..d2fdee3
--- /dev/null
+++ 
b/debian/patches/0004-fix-for-5.6-kernels.-file_operations-dtype-is-change.patch
@@ -0,0 +1,31 @@
+From: Nikita Knutov <m...@nikitosi.us>
+Date: Thu, 9 Apr 2020 09:45:40 +0300
+Subject: fix for 5.6+ kernels. file_operations dtype is changed
+
+---
+ acpi_call.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/acpi_call.c b/acpi_call.c
+index 7f2adb8..3574a44 100644
+--- a/acpi_call.c
++++ b/acpi_call.c
+@@ -318,11 +318,18 @@ static ssize_t acpi_proc_read( struct file *filp, char 
__user *buff,
+     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,
diff --git a/debian/patches/series b/debian/patches/series
index a8b7e9f..93663bb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 0003-Fix-memory-leak-on-args.patch
 0001-Fix-compatibility-with-Linux-3.17.patch
 0002-Fix-build-4.12-copy-from-user.patch
+0004-fix-for-5.6-kernels.-file_operations-dtype-is-change.patch

Attachment: signature.asc
Description: PGP signature

Reply via email to