]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: wlcore: sdio: Use pm_ptr instead of #ifdef CONFIG_PM
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Wed, 17 Dec 2025 11:20:34 +0000 (12:20 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 8 Jan 2026 12:29:38 +0000 (13:29 +0100)
This increases build coverage and removes two ugly #ifdefs.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20251217112033.3309281-4-u.kleine-koenig@baylibre.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/ti/wlcore/sdio.c

index a73207bbe5d7a3c13628d62933e36a6ea30def5b..421d688ae58b3fe5b717b04a40ac5efef53952ac 100644 (file)
@@ -370,7 +370,6 @@ static void wl1271_remove(struct sdio_func *func)
        platform_device_unregister(glue->core);
 }
 
-#ifdef CONFIG_PM
 static int wl1271_suspend(struct device *dev)
 {
        /* Tell MMC/SDIO core it's OK to power down the card
@@ -422,18 +421,15 @@ static const struct dev_pm_ops wl1271_sdio_pm_ops = {
        .suspend        = wl1271_suspend,
        .resume         = wl1271_resume,
 };
-#endif
 
 static struct sdio_driver wl1271_sdio_driver = {
        .name           = "wl1271_sdio",
        .id_table       = wl1271_devices,
        .probe          = wl1271_probe,
        .remove         = wl1271_remove,
-#ifdef CONFIG_PM
        .drv = {
-               .pm = &wl1271_sdio_pm_ops,
+               .pm = pm_ptr(&wl1271_sdio_pm_ops),
        },
-#endif
 };
 
 module_sdio_driver(wl1271_sdio_driver);