summaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorJinjie Ruan <ruanjinjie@huawei.com>2024-09-12 11:30:13 +0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2024-09-13 10:20:48 -0700
commitdcd18a3fb1228409dfc24373c5c6868a655810b0 (patch)
tree4ea7a976199aee73e0fc0916e5cc3f66b55569fa /drivers/input
parent82abef590eb31d373e632743262ee7c42f49c289 (diff)
downloadlinux-dcd18a3fb1228409dfc24373c5c6868a655810b0.tar.gz
linux-dcd18a3fb1228409dfc24373c5c6868a655810b0.tar.bz2
linux-dcd18a3fb1228409dfc24373c5c6868a655810b0.zip
Input: ps2-gpio - use IRQF_NO_AUTOEN flag in request_irq()
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 when request IRQ. Fixes: 9ee0a0558819 ("Input: PS/2 gpio bit banging driver for serio bus") Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://lore.kernel.org/r/20240912033013.2610949-1-ruanjinjie@huawei.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/serio/ps2-gpio.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/input/serio/ps2-gpio.c b/drivers/input/serio/ps2-gpio.c
index 0c8b390b8b4f..3a431395c464 100644
--- a/drivers/input/serio/ps2-gpio.c
+++ b/drivers/input/serio/ps2-gpio.c
@@ -429,16 +429,14 @@ static int ps2_gpio_probe(struct platform_device *pdev)
}
error = devm_request_irq(dev, drvdata->irq, ps2_gpio_irq,
- IRQF_NO_THREAD, DRIVER_NAME, drvdata);
+ IRQF_NO_THREAD | IRQF_NO_AUTOEN, DRIVER_NAME,
+ drvdata);
if (error) {
dev_err(dev, "failed to request irq %d: %d\n",
drvdata->irq, error);
goto err_free_serio;
}
- /* Keep irq disabled until serio->open is called. */
- disable_irq(drvdata->irq);
-
serio->id.type = SERIO_8042;
serio->open = ps2_gpio_open;
serio->close = ps2_gpio_close;