Merge tag 'v5.1' into next
[sfrench/cifs-2.6.git] / drivers / input / keyboard / snvs_pwrkey.c
index c8d748477bd4a8a490beecd28ee9f953865f3a93..5342d8d45f811b399bb740ec4a0158d50c502c44 100644 (file)
@@ -149,6 +149,9 @@ static int imx_snvs_pwrkey_probe(struct platform_device *pdev)
                return error;
        }
 
+       pdata->input = input;
+       platform_set_drvdata(pdev, pdata);
+
        error = devm_request_irq(&pdev->dev, pdata->irq,
                               imx_snvs_pwrkey_interrupt,
                               0, pdev->name, pdev);
@@ -164,9 +167,6 @@ static int imx_snvs_pwrkey_probe(struct platform_device *pdev)
                return error;
        }
 
-       pdata->input = input;
-       platform_set_drvdata(pdev, pdata);
-
        device_init_wakeup(&pdev->dev, pdata->wakeup);
        error = dev_pm_set_wake_irq(&pdev->dev, pdata->irq);
        if (error)