Gentoo Archives: gentoo-commits

From: "Jason A. Donenfeld" <zx2c4@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-power/acpi_call/, sys-power/acpi_call/files/
Date: Sun, 08 Mar 2020 05:07:56
Message-Id: 1583644058.ab39951d4de1e1fb171cd5b01b99a8347b0256b2.zx2c4@gentoo
1 commit: ab39951d4de1e1fb171cd5b01b99a8347b0256b2
2 Author: Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org>
3 AuthorDate: Sun Mar 8 05:06:47 2020 +0000
4 Commit: Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org>
5 CommitDate: Sun Mar 8 05:07:38 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab39951d
7
8 sys-power/acpi_call: support kernel 5.6
9
10 Package-Manager: Portage-2.3.88, Repoman-2.3.20
11 Signed-off-by: Jason A. Donenfeld <zx2c4 <AT> gentoo.org>
12
13 sys-power/acpi_call/acpi_call-3.17.ebuild | 1 +
14 .../acpi_call/files/acpi_call-3.17-linux-5.6.patch | 36 ++++++++++++++++++++++
15 2 files changed, 37 insertions(+)
16
17 diff --git a/sys-power/acpi_call/acpi_call-3.17.ebuild b/sys-power/acpi_call/acpi_call-3.17.ebuild
18 index 186d45388dc..62437ef1097 100644
19 --- a/sys-power/acpi_call/acpi_call-3.17.ebuild
20 +++ b/sys-power/acpi_call/acpi_call-3.17.ebuild
21 @@ -29,6 +29,7 @@ BUILD_TARGETS="default"
22 PATCHES=(
23 "${FILESDIR}/${P}-linux-4.12.patch"
24 "${FILESDIR}/${P}-linux-4.14.patch"
25 + "${FILESDIR}/${P}-linux-5.6.patch"
26 )
27
28 src_compile() {
29
30 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
31 new file mode 100644
32 index 00000000000..c05c7e3c337
33 --- /dev/null
34 +++ b/sys-power/acpi_call/files/acpi_call-3.17-linux-5.6.patch
35 @@ -0,0 +1,36 @@
36 +From d128d10c5f1554254ce55f3c79ca08390279d628 Mon Sep 17 00:00:00 2001
37 +From: "Jason A. Donenfeld" <Jason@×××××.com>
38 +Date: Sun, 8 Mar 2020 13:04:55 +0800
39 +Subject: [PATCH] Support newer proc_ops interface for 5.6
40 +
41 +Signed-off-by: Jason A. Donenfeld <Jason@×××××.com>
42 +---
43 + acpi_call.c | 7 +++++++
44 + 1 file changed, 7 insertions(+)
45 +
46 +diff --git a/acpi_call.c b/acpi_call.c
47 +index 801798b..65eb344 100644
48 +--- a/acpi_call.c
49 ++++ b/acpi_call.c
50 +@@ -348,11 +348,18 @@ static ssize_t acpi_proc_read( struct file *filp, char __user *buff,
51 + return ret;
52 + }
53 +
54 ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
55 + static struct file_operations proc_acpi_operations = {
56 + .owner = THIS_MODULE,
57 + .read = acpi_proc_read,
58 + .write = acpi_proc_write,
59 + };
60 ++#else
61 ++static const struct proc_ops proc_acpi_operations = {
62 ++ .proc_read = acpi_proc_read,
63 ++ .proc_write = acpi_proc_write,
64 ++};
65 ++#endif
66 +
67 + #else
68 + static int acpi_proc_read(char *page, char **start, off_t off,
69 +--
70 +2.25.1
71 +