From: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc@vger.kernel.org, linux-wireless@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v1 2/4] wifi: rsi: sdio: Reduce use of #ifdef for CONFIG_PM
Date: Wed, 17 Dec 2025 12:09:24 +0100 [thread overview]
Message-ID: <f291cca2741f6ac994b2bde1fb9d21194fec4d3e.1765968841.git.ukleinek@kernel.org> (raw)
In-Reply-To: <cover.1765968841.git.ukleinek@kernel.org>
This drops two #ifdefs (which is good because they are ugly) without
changing semantics. This also improves compile coverage because all the
code in the first #ifdef block is now compiled even for configurations
without CONFIG_PM (and then thrown away).
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
drivers/net/wireless/rsi/rsi_91x_sdio.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c
index 1e578533e473..c2b2d09b616f 100644
--- a/drivers/net/wireless/rsi/rsi_91x_sdio.c
+++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c
@@ -1243,7 +1243,6 @@ static void rsi_disconnect(struct sdio_func *pfunction)
}
-#ifdef CONFIG_PM
static int rsi_set_sdio_pm_caps(struct rsi_hw *adapter)
{
struct rsi_91x_sdiodev *dev = adapter->rsi_dev;
@@ -1499,7 +1498,6 @@ static const struct dev_pm_ops rsi_pm_ops = {
.thaw = rsi_thaw,
.restore = rsi_restore,
};
-#endif
static const struct sdio_device_id rsi_dev_table[] = {
{ SDIO_DEVICE(SDIO_VENDOR_ID_RSI, SDIO_DEVICE_ID_RSI_9113) },
@@ -1512,12 +1510,10 @@ static struct sdio_driver rsi_driver = {
.probe = rsi_probe,
.remove = rsi_disconnect,
.id_table = rsi_dev_table,
-#ifdef CONFIG_PM
.drv = {
- .pm = &rsi_pm_ops,
- .shutdown = rsi_shutdown,
+ .pm = pm_ptr(&rsi_pm_ops),
+ .shutdown = pm_ptr(rsi_shutdown),
}
-#endif
};
module_sdio_driver(rsi_driver);
--
2.47.3
next prev parent reply other threads:[~2025-12-17 11:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-17 11:09 [PATCH v1 0/4] sdio: Use bus type function for shutdown Uwe Kleine-König
2025-12-17 11:09 ` [PATCH v1 1/4] sdio: Provide a bustype shutdown function Uwe Kleine-König
2025-12-17 11:09 ` Uwe Kleine-König [this message]
2025-12-20 16:20 ` [PATCH v1 2/4] wifi: rsi: sdio: Reduce use of #ifdef for CONFIG_PM kernel test robot
2025-12-20 17:59 ` kernel test robot
2025-12-29 10:36 ` Johannes Berg
2025-12-30 18:56 ` Uwe Kleine-König
2025-12-17 11:09 ` [PATCH v1 3/4] wifi: rsi: sdio: Migrate to use sdio specific shutdown function Uwe Kleine-König
2025-12-19 12:24 ` Ulf Hansson
2025-12-17 11:09 ` [PATCH v1 4/4] wifi: rtw88: " Uwe Kleine-König
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=f291cca2741f6ac994b2bde1fb9d21194fec4d3e.1765968841.git.ukleinek@kernel.org \
--to=u.kleine-koenig@baylibre.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
/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®