Skip to content

Commit ab39951

Browse files
committedMar 8, 2020
sys-power/acpi_call: support kernel 5.6
Package-Manager: Portage-2.3.88, Repoman-2.3.20 Signed-off-by: Jason A. Donenfeld <[email protected]>
1 parent 09e858d commit ab39951

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed
 

‎sys-power/acpi_call/acpi_call-3.17.ebuild

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ BUILD_TARGETS="default"
2929
PATCHES=(
3030
"${FILESDIR}/${P}-linux-4.12.patch"
3131
"${FILESDIR}/${P}-linux-4.14.patch"
32+
"${FILESDIR}/${P}-linux-5.6.patch"
3233
)
3334

3435
src_compile() {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
From d128d10c5f1554254ce55f3c79ca08390279d628 Mon Sep 17 00:00:00 2001
2+
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
3+
Date: Sun, 8 Mar 2020 13:04:55 +0800
4+
Subject: [PATCH] Support newer proc_ops interface for 5.6
5+
6+
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
7+
---
8+
acpi_call.c | 7 +++++++
9+
1 file changed, 7 insertions(+)
10+
11+
diff --git a/acpi_call.c b/acpi_call.c
12+
index 801798b..65eb344 100644
13+
--- a/acpi_call.c
14+
+++ b/acpi_call.c
15+
@@ -348,11 +348,18 @@ static ssize_t acpi_proc_read( struct file *filp, char __user *buff,
16+
return ret;
17+
}
18+
19+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
20+
static struct file_operations proc_acpi_operations = {
21+
.owner = THIS_MODULE,
22+
.read = acpi_proc_read,
23+
.write = acpi_proc_write,
24+
};
25+
+#else
26+
+static const struct proc_ops proc_acpi_operations = {
27+
+ .proc_read = acpi_proc_read,
28+
+ .proc_write = acpi_proc_write,
29+
+};
30+
+#endif
31+
32+
#else
33+
static int acpi_proc_read(char *page, char **start, off_t off,
34+
--
35+
2.25.1
36+

0 commit comments

Comments
 (0)
Please sign in to comment.