From 6778948f9de86c3cfaf36725a7c87dcff9ba247f Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Mon, 11 Dec 2023 08:20:59 +0000
Subject: [PATCH] kernel_5.10 no rt
---
kernel/drivers/input/touchscreen/gsl3673.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/kernel/drivers/input/touchscreen/gsl3673.c b/kernel/drivers/input/touchscreen/gsl3673.c
index 2191bb6..168df12 100644
--- a/kernel/drivers/input/touchscreen/gsl3673.c
+++ b/kernel/drivers/input/touchscreen/gsl3673.c
@@ -408,6 +408,8 @@
rc--;
msleep(2);
ret = gsl_ts_write(client, 0xf0, &write_buf, sizeof(write_buf));
+ if (ret < 0)
+ rc--;
msleep(2);
ret = gsl_ts_read(client, 0xf0, &read_buf, sizeof(read_buf));
if (ret < 0)
@@ -542,7 +544,7 @@
size_t count, loff_t *data)
{
u8 buf[8] = {0};
- char temp_buf[CONFIG_LEN];
+ char temp_buf[CONFIG_LEN] = {0};
char *path_buf;
int tmp = 0;
int tmp1 = 0;
@@ -552,8 +554,10 @@
return -EFAULT;
}
path_buf = kzalloc(count, GFP_KERNEL);
- if (!path_buf)
+ if (!path_buf) {
print_info("alloc path_buf memory error\n");
+ return -EFAULT;
+ }
if (copy_from_user(path_buf, buffer, count)) {
print_info("copy from user fail\n");
goto exit_write_proc_out;
@@ -755,7 +759,7 @@
#endif
}
-void ts_irq_disable(struct gsl_ts *ts)
+static void ts_irq_disable(struct gsl_ts *ts)
{
unsigned long irqflags;
@@ -767,7 +771,7 @@
spin_unlock_irqrestore(&ts->irq_lock, irqflags);
}
-void ts_irq_enable(struct gsl_ts *ts)
+static void ts_irq_enable(struct gsl_ts *ts)
{
unsigned long irqflags = 0;
@@ -1227,7 +1231,8 @@
queue_delayed_work(gsl_monitor_workqueue, &gsl_monitor_work, 1000);
#endif
#ifdef TPD_PROC_DEBUG
- proc_create(GSL_CONFIG_PROC_FILE, 0644, NULL, &gsl_seq_fops);
+ proc_create(GSL_CONFIG_PROC_FILE, 0644, NULL,
+ (const struct proc_ops *)&gsl_seq_fops);
gsl_proc_flag = 0;
#endif
ts->flag_activated = true;
--
Gitblit v1.6.2