]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Bluetooth: btmtksdio: Use pm_ptr instead of #ifdef CONFIG_PM
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Wed, 17 Dec 2025 11:20:33 +0000 (12:20 +0100)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 29 Jan 2026 18:23:06 +0000 (13:23 -0500)
This increases build coverage and allows to drop an #ifdef.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/btmtksdio.c

index fba3ab6d30a5a0e4eeeda09e5855a4e90748a7d8..e986e5af51ae1250e9a0151f91ebf5070b94c4bd 100644 (file)
@@ -1472,7 +1472,6 @@ static void btmtksdio_remove(struct sdio_func *func)
        hci_free_dev(hdev);
 }
 
-#ifdef CONFIG_PM
 static int btmtksdio_runtime_suspend(struct device *dev)
 {
        struct sdio_func *func = dev_to_sdio_func(dev);
@@ -1542,18 +1541,13 @@ static const struct dev_pm_ops btmtksdio_pm_ops = {
        RUNTIME_PM_OPS(btmtksdio_runtime_suspend, btmtksdio_runtime_resume, NULL)
 };
 
-#define BTMTKSDIO_PM_OPS (&btmtksdio_pm_ops)
-#else  /* CONFIG_PM */
-#define BTMTKSDIO_PM_OPS NULL
-#endif /* CONFIG_PM */
-
 static struct sdio_driver btmtksdio_driver = {
        .name           = "btmtksdio",
        .probe          = btmtksdio_probe,
        .remove         = btmtksdio_remove,
        .id_table       = btmtksdio_table,
        .drv = {
-               .pm = BTMTKSDIO_PM_OPS,
+               .pm = pm_ptr(&btmtksdio_pm_ops),
        }
 };