From 956df1a9c756e9f13bacb073dc6c253663f26905 Mon Sep 17 00:00:00 2001 From: dkwo Date: Sat, 17 Jul 2021 17:03:00 +0200 Subject: [PATCH] acpi_call-dkms: update to 1.2.1 and patch for kernel 5.13 --- .../acpi_call-dkms/patches/linux4.12.patch | 11 ------- srcpkgs/acpi_call-dkms/patches/linux5.6.patch | 21 ------------- .../patches/null_pointer_exception.patch | 30 +++++++++++++++++++ srcpkgs/acpi_call-dkms/template | 10 +++---- 4 files changed, 35 insertions(+), 37 deletions(-) delete mode 100644 srcpkgs/acpi_call-dkms/patches/linux4.12.patch delete mode 100644 srcpkgs/acpi_call-dkms/patches/linux5.6.patch create mode 100644 srcpkgs/acpi_call-dkms/patches/null_pointer_exception.patch diff --git a/srcpkgs/acpi_call-dkms/patches/linux4.12.patch b/srcpkgs/acpi_call-dkms/patches/linux4.12.patch deleted file mode 100644 index 7164cbe7d553..000000000000 --- a/srcpkgs/acpi_call-dkms/patches/linux4.12.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/acpi_call.c 2017-01-03 17:17:55.000000000 +0000 -+++ b/acpi_call.c 2017-07-15 00:28:28.259960007 +0000 -@@ -7,7 +7,7 @@ - #include - #include - #include --#include -+#include - #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0) - #include - #else diff --git a/srcpkgs/acpi_call-dkms/patches/linux5.6.patch b/srcpkgs/acpi_call-dkms/patches/linux5.6.patch deleted file mode 100644 index 5669234a9a9c..000000000000 --- a/srcpkgs/acpi_call-dkms/patches/linux5.6.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/acpi_call.c 2017-01-03 18:17:55.000000000 +0100 -+++ b/acpi_call.c 2020-03-31 10:35:40.493575868 +0200 -@@ -347,11 +347,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, diff --git a/srcpkgs/acpi_call-dkms/patches/null_pointer_exception.patch b/srcpkgs/acpi_call-dkms/patches/null_pointer_exception.patch new file mode 100644 index 000000000000..786e639c03ca --- /dev/null +++ b/srcpkgs/acpi_call-dkms/patches/null_pointer_exception.patch @@ -0,0 +1,30 @@ +From 48011f82726c263f49a2b9ca3d9f674bdb4cfd22 Mon Sep 17 00:00:00 2001 +From: Alexander Wetzel +Date: Thu, 8 Jul 2021 16:37:43 +0200 +Subject: [PATCH] Fix for 5.13+ kernels + +Upstream commit d4455faccd6c ('proc: mandate ->proc_lseek +in "struct proc_ops"') made seek support for proc mandatory. + +Not providing it will cause a null pointer exception for kernels +>=5.13.0 + +Signed-off-by: Alexander Wetzel +--- + acpi_call.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/acpi_call.c b/acpi_call.c +index ebdda25..9fd9886 100644 +--- a/acpi_call.c ++++ b/acpi_call.c +@@ -369,6 +369,9 @@ static ssize_t acpi_proc_read( struct file *filp, char __user *buff, + static struct proc_ops proc_acpi_operations = { + .proc_read = acpi_proc_read, + .proc_write = acpi_proc_write, ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0) ++ .proc_lseek = default_llseek, ++#endif + }; + #else + static struct file_operations proc_acpi_operations = { diff --git a/srcpkgs/acpi_call-dkms/template b/srcpkgs/acpi_call-dkms/template index 2a24e481538f..5d9e4e680e0e 100644 --- a/srcpkgs/acpi_call-dkms/template +++ b/srcpkgs/acpi_call-dkms/template @@ -1,15 +1,15 @@ # Template file for 'acpi_call-dkms' pkgname=acpi_call-dkms -version=1.2.0 -revision=3 +version=1.2.1 +revision=1 archs="i686 x86_64*" wrksrc=acpi_call-${version} short_desc="Kernel module allowing calls to ACPI methods through /proc/acpi/call" maintainer="Daniel A. Maierhofer " license="GPL-3.0-or-later" -homepage="https://github.com/damadmai/acpi_call" -distfiles="$homepage/archive/v$version.tar.gz" -checksum=c48a0a8768d657a8da7b59d7dbf6276554313fa6a0cb012fa4cf85a77e55f44b +homepage="https://github.com/nix-community/acpi_call" +distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz" +checksum=aa84ac8a209e18ee6de5fa809abd3474fdca67cda3c3256f0650c4fce78d4a0f dkms_modules="acpi_call ${version}" depends="dkms"