diff mbox series

[v11,55/56] input: atmel_mxt_ts: don't disable IRQ before remove of mxt_fw_attr_group

Message ID 20200508055656.96389-56-jiada_wang@mentor.com (mailing list archive)
State New
Headers show
Series atmel_mxt_ts misc | expand

Commit Message

Wang, Jiada May 8, 2020, 5:56 a.m. UTC
There is issue when firmware is being updated, but mxt_remove()
is called to remove driver, because at very beginning IRQ is disabled
so that firmware can't proceed, thus cause driver to hang.

This patch by move disable_irq() after remove of mxt_fw_attr_group in
mxt_remove() to address this issue.

Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
 drivers/input/touchscreen/atmel_mxt_ts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series


diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index e75a7e5b0c59..b518c316757d 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -4514,8 +4514,8 @@  static int mxt_remove(struct i2c_client *client)
 	struct mxt_data *data = i2c_get_clientdata(client);
-	disable_irq(data->irq);
 	sysfs_remove_group(&client->dev.kobj, &mxt_fw_attr_group);
+	disable_irq(data->irq);
 	if (data->reset_gpio) {
 		sysfs_remove_link(&client->dev.kobj, "reset");