Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: dw_mmc-rockchip: use modern PM macros

Use the modern PM macros for the suspend and resume functions to be
automatically dropped by the compiler when CONFIG_PM or
CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards.

This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Link: https://lore.kernel.org/r/20250815013413.28641-39-jszhang@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Jisheng Zhang and committed by
Ulf Hansson
4b43f2bc eddc9178

+3 -6
+3 -6
drivers/mmc/host/dw_mmc-rockchip.c
··· 568 568 } 569 569 570 570 static const struct dev_pm_ops dw_mci_rockchip_dev_pm_ops = { 571 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 572 - pm_runtime_force_resume) 573 - SET_RUNTIME_PM_OPS(dw_mci_runtime_suspend, 574 - dw_mci_runtime_resume, 575 - NULL) 571 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 572 + RUNTIME_PM_OPS(dw_mci_runtime_suspend, dw_mci_runtime_resume, NULL) 576 573 }; 577 574 578 575 static struct platform_driver dw_mci_rockchip_pltfm_driver = { ··· 579 582 .name = "dwmmc_rockchip", 580 583 .probe_type = PROBE_PREFER_ASYNCHRONOUS, 581 584 .of_match_table = dw_mci_rockchip_match, 582 - .pm = &dw_mci_rockchip_dev_pm_ops, 585 + .pm = pm_ptr(&dw_mci_rockchip_dev_pm_ops), 583 586 }, 584 587 }; 585 588