diff options
Diffstat (limited to 'drivers/input/keyboard/snvs_pwrkey.c')
-rw-r--r-- | drivers/input/keyboard/snvs_pwrkey.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/input/keyboard/snvs_pwrkey.c b/drivers/input/keyboard/snvs_pwrkey.c index 7544888c4749..8f8de877ded7 100644 --- a/drivers/input/keyboard/snvs_pwrkey.c +++ b/drivers/input/keyboard/snvs_pwrkey.c @@ -156,15 +156,6 @@ static int imx_snvs_pwrkey_probe(struct platform_device *pdev) return error; } - error = devm_request_irq(&pdev->dev, pdata->irq, - imx_snvs_pwrkey_interrupt, - 0, pdev->name, pdev); - - if (error) { - dev_err(&pdev->dev, "interrupt not available.\n"); - return error; - } - error = input_register_device(input); if (error < 0) { dev_err(&pdev->dev, "failed to register input device\n"); @@ -176,6 +167,16 @@ static int imx_snvs_pwrkey_probe(struct platform_device *pdev) device_init_wakeup(&pdev->dev, pdata->wakeup); + error = devm_request_irq(&pdev->dev, pdata->irq, + imx_snvs_pwrkey_interrupt, + 0, pdev->name, pdev); + + if (error) { + dev_err(&pdev->dev, "interrupt not available.\n"); + input_unregister_device(input); + return error; + } + return 0; } |