Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Peng Fan and committed by
Alexandre Belloni
e8a0b6e6 5ad218f1

+1 -11
+1 -11
drivers/rtc/rtc-pm8xxx.c
··· 523 523 if (rc) 524 524 return rc; 525 525 526 - rc = dev_pm_set_wake_irq(&pdev->dev, rtc_dd->alarm_irq); 527 - if (rc) 528 - return rc; 529 - 530 - return 0; 531 - } 532 - 533 - static void pm8xxx_remove(struct platform_device *pdev) 534 - { 535 - dev_pm_clear_wake_irq(&pdev->dev); 526 + return devm_pm_set_wake_irq(&pdev->dev, rtc_dd->alarm_irq); 536 527 } 537 528 538 529 static struct platform_driver pm8xxx_rtc_driver = { 539 530 .probe = pm8xxx_rtc_probe, 540 - .remove = pm8xxx_remove, 541 531 .driver = { 542 532 .name = "rtc-pm8xxx", 543 533 .of_match_table = pm8xxx_id_table,