From: Uwe Kleine-König Date: Wed, 17 Dec 2025 11:20:34 +0000 (+0100) Subject: wifi: wlcore: sdio: Use pm_ptr instead of #ifdef CONFIG_PM X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c874f5fef053652586d2ffa9b4796d021f5c619a;p=thirdparty%2Fkernel%2Flinux.git wifi: wlcore: sdio: Use pm_ptr instead of #ifdef CONFIG_PM This increases build coverage and removes two ugly #ifdefs. Signed-off-by: Uwe Kleine-König Link: https://patch.msgid.link/20251217112033.3309281-4-u.kleine-koenig@baylibre.com Signed-off-by: Johannes Berg --- diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c index a73207bbe5d7a..421d688ae58b3 100644 --- a/drivers/net/wireless/ti/wlcore/sdio.c +++ b/drivers/net/wireless/ti/wlcore/sdio.c @@ -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);