diff options
author | 2025-02-05 08:58:22 +0800 | |
---|---|---|
committer | 2025-03-03 22:52:29 +0100 | |
commit | e8a0b6e62429f5675d37a02be5169de8453a08be (patch) | |
tree | cc2d5bc0d83615ac9410005cdcba134d48b5e1c2 | |
parent | rtc: ds1343: Use devm_pm_set_wake_irq (diff) | |
download | wireguard-linux-e8a0b6e62429f5675d37a02be5169de8453a08be.tar.xz wireguard-linux-e8a0b6e62429f5675d37a02be5169de8453a08be.zip |
rtc: pm8xxx: Use devm_pm_set_wake_irq
Use devm_pm_set_wake_irq, then the 'driver.remove()' could be cleaned up.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20250205-rtc-cleanup-v1-4-66165678e089@nxp.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-rw-r--r-- | drivers/rtc/rtc-pm8xxx.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c index b2518aea4218..852d80188bd0 100644 --- a/drivers/rtc/rtc-pm8xxx.c +++ b/drivers/rtc/rtc-pm8xxx.c @@ -523,21 +523,11 @@ static int pm8xxx_rtc_probe(struct platform_device *pdev) if (rc) return rc; - rc = dev_pm_set_wake_irq(&pdev->dev, rtc_dd->alarm_irq); - if (rc) - return rc; - - return 0; -} - -static void pm8xxx_remove(struct platform_device *pdev) -{ - dev_pm_clear_wake_irq(&pdev->dev); + return devm_pm_set_wake_irq(&pdev->dev, rtc_dd->alarm_irq); } static struct platform_driver pm8xxx_rtc_driver = { .probe = pm8xxx_rtc_probe, - .remove = pm8xxx_remove, .driver = { .name = "rtc-pm8xxx", .of_match_table = pm8xxx_id_table, |