31 lines
977 B
Diff
31 lines
977 B
Diff
From 48011f82726c263f49a2b9ca3d9f674bdb4cfd22 Mon Sep 17 00:00:00 2001
|
|
From: Alexander Wetzel <alexander@wetzel-home.de>
|
|
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 <alexander@wetzel-home.de>
|
|
---
|
|
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 = {
|