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 <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>
This commit is contained in:
Uwe Kleine-König 2025-12-17 12:20:34 +01:00 committed by Johannes Berg
parent 4073ea5161
commit c874f5fef0

View 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);