summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/ar1021_i2c.c
diff options
context:
space:
mode:
authorBarry Song <song.bao.hua@hisilicon.com>2021-03-25 14:43:18 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2021-03-25 15:27:56 -0700
commitbcd9730a04a1f18d873adb3907f2b4830b88ee9a (patch)
treeb51a913a06a95f872090b3aa7a2b54e6e1439b30 /drivers/input/touchscreen/ar1021_i2c.c
parent73cdf82a3dcdc4f50081041ec07e6c47e44692c0 (diff)
Input: move to use request_irq by IRQF_NO_AUTOEN flag
disable_irq() after request_irq() still has a time gap in which interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will disable IRQ auto-enable because of requesting. On the other hand, request_irq() after setting IRQ_NOAUTOEN as below irq_set_status_flags(irq, IRQ_NOAUTOEN); request_irq(dev, irq...); can also be replaced by request_irq() with IRQF_NO_AUTOEN flag. Signed-off-by: Barry Song <song.bao.hua@hisilicon.com> Link: https://lore.kernel.org/r/20210302224916.13980-3-song.bao.hua@hisilicon.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen/ar1021_i2c.c')
-rw-r--r--drivers/input/touchscreen/ar1021_i2c.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/input/touchscreen/ar1021_i2c.c b/drivers/input/touchscreen/ar1021_i2c.c
index c0d5c2413356..dc6a85362a40 100644
--- a/drivers/input/touchscreen/ar1021_i2c.c
+++ b/drivers/input/touchscreen/ar1021_i2c.c
@@ -125,7 +125,7 @@ static int ar1021_i2c_probe(struct i2c_client *client,
error = devm_request_threaded_irq(&client->dev, client->irq,
NULL, ar1021_i2c_irq,
- IRQF_ONESHOT,
+ IRQF_ONESHOT | IRQF_NO_AUTOEN,
"ar1021_i2c", ar1021);
if (error) {
dev_err(&client->dev,
@@ -133,9 +133,6 @@ static int ar1021_i2c_probe(struct i2c_client *client,
return error;
}
- /* Disable the IRQ, we'll enable it in ar1021_i2c_open() */
- disable_irq(client->irq);
-
error = input_register_device(ar1021->input);
if (error) {
dev_err(&client->dev,