openwrt/target/linux/bcm27xx/patches-5.15/950-0480-Input-edt-ft54x6-Clean-up-timer-and-workqueue-on-rem.patch
Álvaro Fernández Rojas 20ea6adbf1 bcm27xx: add support for linux v5.15
Build system: x86_64
Build-tested: bcm2708, bcm2709, bcm2710, bcm2711
Run-tested: bcm2708/RPiB+, bcm2709/RPi3B, bcm2710/RPi3B, bcm2711/RPi4B

Signed-off-by: Marty Jones <mj8263788@gmail.com>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2022-05-17 15:11:22 +02:00

32 lines
1001 B
Diff

From 55314e9ff8225d0c110e6598d2837baac17a30cd 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] 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(+)
--- a/drivers/input/touchscreen/edt-ft5x06.c
+++ b/drivers/input/touchscreen/edt-ft5x06.c
@@ -1301,6 +1301,10 @@ static int edt_ft5x06_ts_remove(struct i
{
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);
return 0;