summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason A. Donenfeld <zx2c4@gentoo.org>2020-03-08 13:06:47 +0800
committerJason A. Donenfeld <zx2c4@gentoo.org>2020-03-08 13:07:38 +0800
commitab39951d4de1e1fb171cd5b01b99a8347b0256b2 (patch)
tree94f6ec229d05dbf38bf1c0dd692984366ded0599 /sys-power
parentsci-libs/lapack: readd deprecated functions. (diff)
downloadgentoo-ab39951d4de1e1fb171cd5b01b99a8347b0256b2.tar.gz
gentoo-ab39951d4de1e1fb171cd5b01b99a8347b0256b2.tar.bz2
gentoo-ab39951d4de1e1fb171cd5b01b99a8347b0256b2.zip
sys-power/acpi_call: support kernel 5.6
Package-Manager: Portage-2.3.88, Repoman-2.3.20 Signed-off-by: Jason A. Donenfeld <zx2c4@gentoo.org>
Diffstat (limited to 'sys-power')
-rw-r--r--sys-power/acpi_call/acpi_call-3.17.ebuild1
-rw-r--r--sys-power/acpi_call/files/acpi_call-3.17-linux-5.6.patch36
2 files changed, 37 insertions, 0 deletions
diff --git a/sys-power/acpi_call/acpi_call-3.17.ebuild b/sys-power/acpi_call/acpi_call-3.17.ebuild
index 186d45388dc7..62437ef10975 100644
--- a/sys-power/acpi_call/acpi_call-3.17.ebuild
+++ b/sys-power/acpi_call/acpi_call-3.17.ebuild
@@ -29,6 +29,7 @@ BUILD_TARGETS="default"
PATCHES=(
"${FILESDIR}/${P}-linux-4.12.patch"
"${FILESDIR}/${P}-linux-4.14.patch"
+ "${FILESDIR}/${P}-linux-5.6.patch"
)
src_compile() {
diff --git a/sys-power/acpi_call/files/acpi_call-3.17-linux-5.6.patch b/sys-power/acpi_call/files/acpi_call-3.17-linux-5.6.patch
new file mode 100644
index 000000000000..c05c7e3c337e
--- /dev/null
+++ b/sys-power/acpi_call/files/acpi_call-3.17-linux-5.6.patch
@@ -0,0 +1,36 @@
+From d128d10c5f1554254ce55f3c79ca08390279d628 Mon Sep 17 00:00:00 2001
+From: "Jason A. Donenfeld" <Jason@zx2c4.com>
+Date: Sun, 8 Mar 2020 13:04:55 +0800
+Subject: [PATCH] Support newer proc_ops interface for 5.6
+
+Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
+---
+ acpi_call.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/acpi_call.c b/acpi_call.c
+index 801798b..65eb344 100644
+--- a/acpi_call.c
++++ b/acpi_call.c
+@@ -348,11 +348,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 file_operations proc_acpi_operations = {
+ .owner = THIS_MODULE,
+ .read = acpi_proc_read,
+ .write = acpi_proc_write,
+ };
++#else
++static const struct proc_ops proc_acpi_operations = {
++ .proc_read = acpi_proc_read,
++ .proc_write = acpi_proc_write,
++};
++#endif
+
+ #else
+ static int acpi_proc_read(char *page, char **start, off_t off,
+--
+2.25.1
+