]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
rtc: ds1343: Use devm_pm_set_wake_irq
authorPeng Fan <peng.fan@nxp.com>
Wed, 5 Feb 2025 00:58:21 +0000 (08:58 +0800)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 3 Mar 2025 21:52:29 +0000 (22:52 +0100)
Use devm_pm_set_wake_irq, then the 'driver.remove()' could be cleaned up.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20250205-rtc-cleanup-v1-3-66165678e089@nxp.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-ds1343.c

index ed5a6ba89a3eeb2a0b9d6dea3c8b3d40aa2cf317..aa9500791b7e0300b150bd654b69c74f3e5e6e6b 100644 (file)
@@ -427,18 +427,13 @@ static int ds1343_probe(struct spi_device *spi)
                                "unable to request irq for rtc ds1343\n");
                } else {
                        device_init_wakeup(&spi->dev, true);
-                       dev_pm_set_wake_irq(&spi->dev, spi->irq);
+                       devm_pm_set_wake_irq(&spi->dev, spi->irq);
                }
        }
 
        return 0;
 }
 
-static void ds1343_remove(struct spi_device *spi)
-{
-       dev_pm_clear_wake_irq(&spi->dev);
-}
-
 #ifdef CONFIG_PM_SLEEP
 
 static int ds1343_suspend(struct device *dev)
@@ -471,7 +466,6 @@ static struct spi_driver ds1343_driver = {
                .pm = &ds1343_pm,
        },
        .probe = ds1343_probe,
-       .remove = ds1343_remove,
        .id_table = ds1343_id,
 };