bcm27xx: 6.1: add kernel patches
[openwrt/staging/nbd.git] / target / linux / bcm27xx / patches-6.1 / 950-0333-Input-edt-ft54x6-Clean-up-timer-and-workqueue-on-rem.patch
1 From 1d2ab2a7cfba5a4298b0d06d05fdc0584c63c6f4 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
5 remove
6
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.
10
11 Fixes: ca61fdaba79f "Input: edt-ft5x06: Poll the device if no interrupt is
12 configured."
13
14 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
15 ---
16 drivers/input/touchscreen/edt-ft5x06.c | 4 ++++
17 1 file changed, 4 insertions(+)
18
19 --- a/drivers/input/touchscreen/edt-ft5x06.c
20 +++ b/drivers/input/touchscreen/edt-ft5x06.c
21 @@ -1381,6 +1381,10 @@ static void edt_ft5x06_ts_remove(struct
22 {
23 struct edt_ft5x06_ts_data *tsdata = i2c_get_clientdata(client);
24
25 + if (!client->irq) {
26 + del_timer(&tsdata->timer);
27 + cancel_work_sync(&tsdata->work_i2c_poll);
28 + }
29 edt_ft5x06_ts_teardown_debugfs(tsdata);
30 }
31