1
0
mirror of https://github.com/home-assistant/operating-system.git synced 2026-05-01 22:23:52 +01:00
Files
operating-system/buildroot-external/package/eq3_char_loop/0003-Fix-eq3_char_loop-driver-build-on-Linux-6.4.patch
Jens Maus fc962f8a13 Add eq3_char_loop patch for termios2/glibc 2.42+ compatibility (#4471)
This PR updates the eq3_char_loop package to contain the latest
eq3_char_loop v1.3 sources with termios2 compatibility which is required
for glibc 2.42+ environments (latest OpenCCU) so that the HMIPServer
within OpenCCU is able to startup correctly.
2026-01-06 14:11:29 +01:00

38 lines
1.3 KiB
Diff

From af4cac0d31d166c9ea5992e90b81973d817dd91d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= <sairon@sairon.cz>
Date: Thu, 11 Jan 2024 11:39:47 +0100
Subject: [PATCH] Fix eq3_char_loop driver build on Linux 6.4+
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream: Not applicable
Signed-off-by: Jan Čermák <sairon@sairon.cz>
---
KernelDrivers/eq3_char_loop.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/KernelDrivers/eq3_char_loop.c b/KernelDrivers/eq3_char_loop.c
index cc946fd..d01263a 100644
--- a/KernelDrivers/eq3_char_loop.c
+++ b/KernelDrivers/eq3_char_loop.c
@@ -950,7 +950,14 @@ static int __init eq3loop_init(void)
printk(KERN_ERR EQ3LOOP_DRIVER_NAME ": Unable to add driver\n");
goto out_unregister_chrdev_region;
}
+/* Linux changed signature of class_create in 6.4+
+ * see: https://lore.kernel.org/all/20230324100132.1633647-1-gregkh@linuxfoundation.org/
+*/
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
control_data->class=class_create(THIS_MODULE, EQ3LOOP_DRIVER_NAME);
+#else
+ control_data->class=class_create(EQ3LOOP_DRIVER_NAME);
+#endif
if(IS_ERR(control_data->class)){
ret = -EIO;
printk(KERN_ERR EQ3LOOP_DRIVER_NAME ": Unable to register driver class\n");
--
2.34.1