Commit 05df5572 authored by Alexandre Belloni's avatar Alexandre Belloni

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.comSigned-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 0680a6cd
...@@ -437,15 +437,7 @@ static int ds1343_probe(struct spi_device *spi) ...@@ -437,15 +437,7 @@ static int ds1343_probe(struct spi_device *spi)
static int ds1343_remove(struct spi_device *spi) static int ds1343_remove(struct spi_device *spi)
{ {
struct ds1343_priv *priv = spi_get_drvdata(spi); dev_pm_clear_wake_irq(&spi->dev);
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);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment