diff options
Diffstat (limited to 'drivers/rtc/rtc-zynqmp.c')
-rw-r--r-- | drivers/rtc/rtc-zynqmp.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/rtc/rtc-zynqmp.c b/drivers/rtc/rtc-zynqmp.c index fba994dc31eb..c532bd13fbe5 100644 --- a/drivers/rtc/rtc-zynqmp.c +++ b/drivers/rtc/rtc-zynqmp.c @@ -278,10 +278,9 @@ static int xlnx_rtc_remove(struct platform_device *pdev) static int __maybe_unused xlnx_rtc_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct xlnx_rtc_dev *xrtcdev = platform_get_drvdata(pdev); + struct xlnx_rtc_dev *xrtcdev = dev_get_drvdata(dev); - if (device_may_wakeup(&pdev->dev)) + if (device_may_wakeup(dev)) enable_irq_wake(xrtcdev->alarm_irq); else xlnx_rtc_alarm_irq_enable(dev, 0); @@ -291,10 +290,9 @@ static int __maybe_unused xlnx_rtc_suspend(struct device *dev) static int __maybe_unused xlnx_rtc_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct xlnx_rtc_dev *xrtcdev = platform_get_drvdata(pdev); + struct xlnx_rtc_dev *xrtcdev = dev_get_drvdata(dev); - if (device_may_wakeup(&pdev->dev)) + if (device_may_wakeup(dev)) disable_irq_wake(xrtcdev->alarm_irq); else xlnx_rtc_alarm_irq_enable(dev, 1); |