1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-02-15 04:42:02 +00:00
openmptcprouter/6.1/target/linux/bcm27xx/patches-6.1/0341-Input-edt-ft54x6-Clean-up-timer-and-workqueue-on-rem.patch

36 lines
1.1 KiB
Diff

From 818bb6d49db23300ab816fe6e1e71b6387f79d96 Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
Date: Wed, 8 Sep 2021 14:46:17 +0100
Subject: [PATCH 341/726] Input: edt-ft54x6: Clean up timer and workqueue on
remove
If no interrupt is defined then a timer and workqueue are used
to poll the controller.
On remove these were not being cleaned up correctly.
Fixes: ca61fdaba79f "Input: edt-ft5x06: Poll the device if no interrupt is
configured."
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
drivers/input/touchscreen/edt-ft5x06.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
index d5574835b198..06731d73ec28 100644
--- a/drivers/input/touchscreen/edt-ft5x06.c
+++ b/drivers/input/touchscreen/edt-ft5x06.c
@@ -1381,6 +1381,10 @@ static void edt_ft5x06_ts_remove(struct i2c_client *client)
{
struct edt_ft5x06_ts_data *tsdata = i2c_get_clientdata(client);
+ if (!client->irq) {
+ del_timer(&tsdata->timer);
+ cancel_work_sync(&tsdata->work_i2c_poll);
+ }
edt_ft5x06_ts_teardown_debugfs(tsdata);
}
--
2.33.1