]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
rtc: mpfs: switch to devm_device_init_wakeup
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 3 Mar 2025 22:35:56 +0000 (23:35 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 17 Mar 2025 10:51:49 +0000 (11:51 +0100)
Switch to devm_device_init_wakeup to avoid a possible memory leak as wakeup
is never disabled.

Link: https://lore.kernel.org/r/20250303223600.1135142-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-mpfs.c

index 5a38649cbd43b3c6f2fec5db95c4f0013deb2a08..6aa3eae575d2ad29f43fc21f70100190ac56c759 100644 (file)
@@ -266,7 +266,7 @@ static int mpfs_rtc_probe(struct platform_device *pdev)
        writel(prescaler, rtcdev->base + PRESCALER_REG);
        dev_info(&pdev->dev, "prescaler set to: %lu\n", prescaler);
 
-       device_init_wakeup(&pdev->dev, true);
+       devm_device_init_wakeup(&pdev->dev);
        ret = devm_pm_set_wake_irq(&pdev->dev, wakeup_irq);
        if (ret)
                dev_err(&pdev->dev, "failed to enable irq wake\n");