lkml.org 
[lkml]   [2021]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v3 11/12] Input: tegra-kbc - request_irq by IRQF_NO_AUTOEN and remove disable_irq
    Date
    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.

    Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
    ---
    drivers/input/keyboard/tegra-kbc.c | 5 ++---
    1 file changed, 2 insertions(+), 3 deletions(-)

    diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c
    index 9671842a082a..570fe18c0ce9 100644
    --- a/drivers/input/keyboard/tegra-kbc.c
    +++ b/drivers/input/keyboard/tegra-kbc.c
    @@ -694,14 +694,13 @@ static int tegra_kbc_probe(struct platform_device *pdev)
    input_set_drvdata(kbc->idev, kbc);

    err = devm_request_irq(&pdev->dev, kbc->irq, tegra_kbc_isr,
    - IRQF_TRIGGER_HIGH, pdev->name, kbc);
    + IRQF_TRIGGER_HIGH | IRQF_NO_AUTOEN,
    + pdev->name, kbc);
    if (err) {
    dev_err(&pdev->dev, "failed to request keyboard IRQ\n");
    return err;
    }

    - disable_irq(kbc->irq);
    -
    err = input_register_device(kbc->idev);
    if (err) {
    dev_err(&pdev->dev, "failed to register input device\n");
    --
    2.25.1
    \
     
     \ /
      Last update: 2021-01-07 23:46    [W:2.264 / U:1.912 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site