summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-ds1343.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2019-10-19 22:49:41 +0200
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2019-10-19 22:56:11 +0200
commit05df557285394ed54b771184bc7646328f47da21 (patch)
tree700b6b1fc53ca241109c67fd60a2ec87c2170ee1 /drivers/rtc/rtc-ds1343.c
parent0680a6cdabf0629ab276d4d78b61c4761d15cb28 (diff)
rtc: ds1343: cleanup .remove
It is not necessary to call device_init_wakeup(dev, false) in .remove as device_del will take care of that. It is also not necessary to devm_free_irq. Finally, dev_pm_clear_wake_irq can be called unconditionally. Link: https://lore.kernel.org/r/20191019204941.6203-9-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-ds1343.c')
-rw-r--r--drivers/rtc/rtc-ds1343.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/rtc/rtc-ds1343.c b/drivers/rtc/rtc-ds1343.c
index 131f5fd48ddc..d21004a68ee0 100644
--- a/drivers/rtc/rtc-ds1343.c
+++ b/drivers/rtc/rtc-ds1343.c
@@ -437,15 +437,7 @@ static int ds1343_probe(struct spi_device *spi)
static int ds1343_remove(struct spi_device *spi)
{
- struct ds1343_priv *priv = spi_get_drvdata(spi);
-
- if (spi->irq) {
- dev_pm_clear_wake_irq(&spi->dev);
- device_init_wakeup(&spi->dev, false);
- devm_free_irq(&spi->dev, spi->irq, priv);
- }
-
- spi_set_drvdata(spi, NULL);
+ dev_pm_clear_wake_irq(&spi->dev);
return 0;
}