From: Dmitry Torokhov Date: Fri, 10 May 2019 18:43:46 +0000 (-0700) Subject: Merge tag 'v5.1' into next X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2a267e7c41aa88215de2b542de797d03d16ecdfd;p=linux.git Merge tag 'v5.1' into next Sync up with mainline to bring in the latest APIs. --- 2a267e7c41aa88215de2b542de797d03d16ecdfd diff --cc drivers/input/keyboard/snvs_pwrkey.c index c8d748477bd4a,4c67cf30a5d9a..5342d8d45f811 --- a/drivers/input/keyboard/snvs_pwrkey.c +++ b/drivers/input/keyboard/snvs_pwrkey.c @@@ -164,13 -166,29 +167,10 @@@ static int imx_snvs_pwrkey_probe(struc return error; } - pdata->input = input; - platform_set_drvdata(pdev, pdata); - device_init_wakeup(&pdev->dev, pdata->wakeup); - - return 0; -} - -static int __maybe_unused imx_snvs_pwrkey_suspend(struct device *dev) -{ - struct platform_device *pdev = to_platform_device(dev); - struct pwrkey_drv_data *pdata = platform_get_drvdata(pdev); - - if (device_may_wakeup(&pdev->dev)) - enable_irq_wake(pdata->irq); - - return 0; -} - -static int __maybe_unused imx_snvs_pwrkey_resume(struct device *dev) -{ - struct platform_device *pdev = to_platform_device(dev); - struct pwrkey_drv_data *pdata = platform_get_drvdata(pdev); - - if (device_may_wakeup(&pdev->dev)) - disable_irq_wake(pdata->irq); + error = dev_pm_set_wake_irq(&pdev->dev, pdata->irq); + if (error) + dev_err(&pdev->dev, "irq wake enable failed.\n"); return 0; }