summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2026-03-05 10:08:24 +0100
committerUlf Hansson <ulf.hansson@linaro.org>2026-03-09 14:20:57 +0100
commit4cbdda11fd016689edd5f200726190701bfc7f2a (patch)
tree928830a43bd31db08a2db743e8e6109ed1196f03
parentbdc1eb80b9b9793e28f625a790b0ae0387bb5b17 (diff)
mmc: renesas_sdhi_sys_dmac: Convert to DEFINE_RUNTIME_DEV_PM_OPS()
Convert the Renesas SDHI SD/SDIO controller driver using SYS-DMAC from an open-coded dev_pm_ops structure to DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr(). This simplifies the code, and reduces kernel size in case CONFIG_PM is disabled. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/mmc/host/renesas_sdhi_sys_dmac.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/mmc/host/renesas_sdhi_sys_dmac.c b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
index 543ad1d0ed1c..9215600f03a2 100644
--- a/drivers/mmc/host/renesas_sdhi_sys_dmac.c
+++ b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
@@ -456,19 +456,15 @@ static int renesas_sdhi_sys_dmac_probe(struct platform_device *pdev)
of_device_get_match_data(&pdev->dev), NULL);
}
-static const struct dev_pm_ops renesas_sdhi_sys_dmac_dev_pm_ops = {
- SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
- pm_runtime_force_resume)
- SET_RUNTIME_PM_OPS(tmio_mmc_host_runtime_suspend,
- tmio_mmc_host_runtime_resume,
- NULL)
-};
+static DEFINE_RUNTIME_DEV_PM_OPS(renesas_sdhi_sys_dmac_dev_pm_ops,
+ tmio_mmc_host_runtime_suspend,
+ tmio_mmc_host_runtime_resume, NULL);
static struct platform_driver renesas_sys_dmac_sdhi_driver = {
.driver = {
.name = "sh_mobile_sdhi",
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
- .pm = &renesas_sdhi_sys_dmac_dev_pm_ops,
+ .pm = pm_ptr(&renesas_sdhi_sys_dmac_dev_pm_ops),
.of_match_table = renesas_sdhi_sys_dmac_of_match,
},
.probe = renesas_sdhi_sys_dmac_probe,