summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Schenker <philippe.schenker@toradex.com>2019-05-08 13:03:58 +0200
committerPhilippe Schenker <philippe.schenker@toradex.com>2019-05-08 13:03:58 +0200
commita1764124242f973fafdcf66c5384c53b638786ea (patch)
tree28b65ec852d1d120ceab152b3d4418e0ebbbb715
parent1175b59611537b0b451e0d1071b1666873a8ec32 (diff)
Revert "MLK-16262: Input: snvs_pwrkey - move devm_request_irq to the end of probe function"
This reverts commit 98d6bd67e3fc191dba8895807e6d90cf33813984. The same fix will be applied later with a commit from linux-stable.
-rw-r--r--drivers/input/keyboard/snvs_pwrkey.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/input/keyboard/snvs_pwrkey.c b/drivers/input/keyboard/snvs_pwrkey.c
index 8f8de877ded7..7544888c4749 100644
--- a/drivers/input/keyboard/snvs_pwrkey.c
+++ b/drivers/input/keyboard/snvs_pwrkey.c
@@ -156,6 +156,15 @@ 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");
@@ -167,16 +176,6 @@ 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;
}