eta-touchdrv/0001-patch-for-6.x.patch
2024-03-28 19:38:48 +03:00

50 lines
1.6 KiB
Diff

From a8f27b1733213e36a50af6a1917fd14482246a2a Mon Sep 17 00:00:00 2001
From: slonkazoid <slonkazoid@slonk.ing>
Date: Thu, 28 Mar 2024 19:21:29 +0300
Subject: [PATCH] patch for 6.x
---
usr/src/eta-touchdrv/touch2/OpticalDrv.c | 3 +++
usr/src/eta-touchdrv/touch4/OtdDrv.c | 5 ++++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/usr/src/eta-touchdrv/touch2/OpticalDrv.c b/usr/src/eta-touchdrv/touch2/OpticalDrv.c
index d3a5057..55f9156 100644
--- a/usr/src/eta-touchdrv/touch2/OpticalDrv.c
+++ b/usr/src/eta-touchdrv/touch2/OpticalDrv.c
@@ -22,6 +22,9 @@
#define OPTICAL_MINOR_BASE 0
+#define strlcpy(dst,src,dsize) strncpy(dst,src,(dsize)-1)
+#define strlcat(dst,src,ssize) strncat(dst,src,(ssize)-1)
+
typedef struct _device_context_pool
{
char name[128];
diff --git a/usr/src/eta-touchdrv/touch4/OtdDrv.c b/usr/src/eta-touchdrv/touch4/OtdDrv.c
index d9708df..6095b32 100644
--- a/usr/src/eta-touchdrv/touch4/OtdDrv.c
+++ b/usr/src/eta-touchdrv/touch4/OtdDrv.c
@@ -21,6 +21,9 @@
#define info(format, arg...) \
printk(KERN_INFO KBUILD_MODNAME ": " format "\n", ##arg)
+#define strlcpy(dst,src,dsize) strncpy(dst,src,(dsize)-1)
+#define strlcat(dst,src,ssize) strncat(dst,src,(ssize)-1)
+
typedef struct _device_context_pool
{
@@ -443,7 +446,7 @@ static int otd_init(void)
int result;
//֮ǰÔÚotd_mkdevÄÚ
- otd_class = class_create(THIS_MODULE, DEVICE_NODE_NAME);
+ otd_class = class_create(THIS_MODULE->name);
if (IS_ERR(otd_class))
{
err("%s: Class create failed.", __func__);
--
2.44.0