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

mmc: sdhci_am654: 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-17-jszhang@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Jisheng Zhang and committed by
Ulf Hansson
5861ff20 f94509c9

+3 -7
+3 -7
drivers/mmc/host/sdhci_am654.c
··· 1035 1035 pm_runtime_put_noidle(dev); 1036 1036 } 1037 1037 1038 - #ifdef CONFIG_PM 1039 1038 static int sdhci_am654_restore(struct sdhci_host *host) 1040 1039 { 1041 1040 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); ··· 1122 1123 1123 1124 return 0; 1124 1125 } 1125 - #endif 1126 1126 1127 1127 static const struct dev_pm_ops sdhci_am654_dev_pm_ops = { 1128 - SET_RUNTIME_PM_OPS(sdhci_am654_runtime_suspend, 1129 - sdhci_am654_runtime_resume, NULL) 1130 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 1131 - pm_runtime_force_resume) 1128 + RUNTIME_PM_OPS(sdhci_am654_runtime_suspend, sdhci_am654_runtime_resume, NULL) 1129 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 1132 1130 }; 1133 1131 1134 1132 static struct platform_driver sdhci_am654_driver = { 1135 1133 .driver = { 1136 1134 .name = "sdhci-am654", 1137 1135 .probe_type = PROBE_PREFER_ASYNCHRONOUS, 1138 - .pm = &sdhci_am654_dev_pm_ops, 1136 + .pm = pm_ptr(&sdhci_am654_dev_pm_ops), 1139 1137 .of_match_table = sdhci_am654_of_match, 1140 1138 }, 1141 1139 .probe = sdhci_am654_probe,