[PATCH wifi-next] wifi: ath10k: sdio: Use pm_sleep_ptr instead of #ifdef CONFIG_PM_SLEEP
Uwe Kleine-König
u.kleine-koenig at baylibre.com
Wed Dec 17 03:19:48 PST 2025
This increases build coverage and removes an ugly #ifdef block.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig at baylibre.com>
---
Hello,
I found the patch opportunity while looking in this driver for a different
reason.
Best regards
Uwe
drivers/net/wireless/ath/ath10k/sdio.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c
index c06d50db40b8..3efe744c0c96 100644
--- a/drivers/net/wireless/ath/ath10k/sdio.c
+++ b/drivers/net/wireless/ath/ath10k/sdio.c
@@ -2136,8 +2136,6 @@ static const struct ath10k_hif_ops ath10k_sdio_hif_ops = {
#endif
};
-#ifdef CONFIG_PM_SLEEP
-
/* Empty handlers so that mmc subsystem doesn't remove us entirely during
* suspend. We instead follow cfg80211 suspend/resume handlers.
*/
@@ -2175,14 +2173,6 @@ static int ath10k_sdio_pm_resume(struct device *device)
static SIMPLE_DEV_PM_OPS(ath10k_sdio_pm_ops, ath10k_sdio_pm_suspend,
ath10k_sdio_pm_resume);
-#define ATH10K_SDIO_PM_OPS (&ath10k_sdio_pm_ops)
-
-#else
-
-#define ATH10K_SDIO_PM_OPS NULL
-
-#endif /* CONFIG_PM_SLEEP */
-
static int ath10k_sdio_napi_poll(struct napi_struct *ctx, int budget)
{
struct ath10k *ar = container_of(ctx, struct ath10k, napi);
@@ -2668,7 +2658,7 @@ static struct sdio_driver ath10k_sdio_driver = {
.probe = ath10k_sdio_probe,
.remove = ath10k_sdio_remove,
.drv = {
- .pm = ATH10K_SDIO_PM_OPS,
+ .pm = pm_sleep_ptr(&ath10k_sdio_pm_ops),
},
};
module_sdio_driver(ath10k_sdio_driver);
base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
--
2.47.3
More information about the ath10k
mailing list