Skip to content

Commit dcd18a3

Browse files
Jinjie Ruandtor
authored andcommitted
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: 9ee0a05 ("Input: PS/2 gpio bit banging driver for serio bus") Signed-off-by: Jinjie Ruan <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 82abef5 commit dcd18a3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/input/serio/ps2-gpio.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,16 +429,14 @@ static int ps2_gpio_probe(struct platform_device *pdev)
429429
}
430430

431431
error = devm_request_irq(dev, drvdata->irq, ps2_gpio_irq,
432-
IRQF_NO_THREAD, DRIVER_NAME, drvdata);
432+
IRQF_NO_THREAD | IRQF_NO_AUTOEN, DRIVER_NAME,
433+
drvdata);
433434
if (error) {
434435
dev_err(dev, "failed to request irq %d: %d\n",
435436
drvdata->irq, error);
436437
goto err_free_serio;
437438
}
438439

439-
/* Keep irq disabled until serio->open is called. */
440-
disable_irq(drvdata->irq);
441-
442440
serio->id.type = SERIO_8042;
443441
serio->open = ps2_gpio_open;
444442
serio->close = ps2_gpio_close;

0 commit comments

Comments
 (0)