1 From 55314e9ff8225d0c110e6598d2837baac17a30cd Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Wed, 8 Sep 2021 14:46:17 +0100
4 Subject: [PATCH] Input: edt-ft54x6: Clean up timer and workqueue on
7 If no interrupt is defined then a timer and workqueue are used
8 to poll the controller.
9 On remove these were not being cleaned up correctly.
11 Fixes: ca61fdaba79f "Input: edt-ft5x06: Poll the device if no interrupt is
14 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
16 drivers/input/touchscreen/edt-ft5x06.c | 4 ++++
17 1 file changed, 4 insertions(+)
19 --- a/drivers/input/touchscreen/edt-ft5x06.c
20 +++ b/drivers/input/touchscreen/edt-ft5x06.c
21 @@ -1301,6 +1301,10 @@ static int edt_ft5x06_ts_remove(struct i
23 struct edt_ft5x06_ts_data *tsdata = i2c_get_clientdata(client);
26 + del_timer(&tsdata->timer);
27 + cancel_work_sync(&tsdata->work_i2c_poll);
29 edt_ft5x06_ts_teardown_debugfs(tsdata);