From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Linus Walleij <linus.walleij@linaro.org>,
Conor Dooley <conor.dooley@microchip.com>,
Daire McNamara <daire.mcnamara@microchip.com>
Cc: linux-rtc@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-riscv@lists.infradead.org, Peng Fan <peng.fan@nxp.com>
Subject: [PATCH 3/7] rtc: ds1343: Use devm_pm_set_wake_irq
Date: Wed, 05 Feb 2025 08:58:21 +0800 [thread overview]
Message-ID: <20250205-rtc-cleanup-v1-3-66165678e089@nxp.com> (raw)
In-Reply-To: <20250205-rtc-cleanup-v1-0-66165678e089@nxp.com>
From: Peng Fan <peng.fan@nxp.com>
Use devm_pm_set_wake_irq, then the 'driver.remove()' could be cleaned up.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/rtc/rtc-ds1343.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/rtc/rtc-ds1343.c b/drivers/rtc/rtc-ds1343.c
index ed5a6ba89a3eeb2a0b9d6dea3c8b3d40aa2cf317..aa9500791b7e0300b150bd654b69c74f3e5e6e6b 100644
--- a/drivers/rtc/rtc-ds1343.c
+++ b/drivers/rtc/rtc-ds1343.c
@@ -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,
};
--
2.37.1
next prev parent reply other threads:[~2025-02-05 0:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-05 0:58 [PATCH 0/7] rtc: Use devm_pm_set_wake_irq to simplify code Peng Fan (OSS)
2025-02-05 0:58 ` [PATCH 1/7] rtc: stm32: Use resource managed API " Peng Fan (OSS)
2025-02-05 0:58 ` [PATCH 2/7] rtc: nxp-bbnsm: " Peng Fan (OSS)
2025-02-05 0:58 ` Peng Fan (OSS) [this message]
2025-02-05 0:58 ` [PATCH 4/7] rtc: pm8xxx: Use devm_pm_set_wake_irq Peng Fan (OSS)
2025-02-05 0:58 ` [PATCH 5/7] rtc: ab8500: Use resource managed API to simplify code Peng Fan (OSS)
2025-02-05 0:58 ` [PATCH 6/7] rtc: mpfs: Use devm_pm_set_wake_irq Peng Fan (OSS)
2025-02-05 0:58 ` [PATCH 7/7] rtc: pl031: Use resource managed API to simplify code Peng Fan (OSS)
2025-03-03 8:03 ` [PATCH 0/7] rtc: Use devm_pm_set_wake_irq " Peng Fan
2025-03-03 21:53 ` Alexandre Belloni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250205-rtc-cleanup-v1-3-66165678e089@nxp.com \
--to=peng.fan@oss.nxp.com \
--cc=alexandre.belloni@bootlin.com \
--cc=alexandre.torgue@foss.st.com \
--cc=conor.dooley@microchip.com \
--cc=daire.mcnamara@microchip.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-rtc@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=peng.fan@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®