Skip to content

Commit 57939f3

Browse files
Fabio Estevamabelvesa
authored andcommitted
clk: imx: imx8mp: Switch to RUNTIME_PM_OPS()
Replace SET_RUNTIME_PM_OPS() with its modern alternative RUNTIME_PM_OPS(). The combined usage of pm_ptr() and RUNTIME_PM_OPS() allows the compiler to evaluate if the suspend/resume() functions are used at buid time or are simply dead code. This fixes the following s390 allmodconfig build errors: drivers/clk/imx/clk-imx8mp-audiomix.c:363:12: error: 'clk_imx8mp_audiomix_runtime_resume' defined but not used [-Werror=unused-function] 363 | static int clk_imx8mp_audiomix_runtime_resume(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/clk/imx/clk-imx8mp-audiomix.c:356:12: error: 'clk_imx8mp_audiomix_runtime_suspend' defined but not used [-Werror=unused-function] 356 | static int clk_imx8mp_audiomix_runtime_suspend(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org> Closes: https://lore.kernel.org/linux-clk/CA+G9fYuP7S+a89Ep5g5_Ad69EMwRkJ8nM+MMTzbEcP+6H2oMXQ@mail.gmail.com/T/#u Fixes: 1496dd4 ("clk: imx: imx8mp: Add pm_runtime support for power saving") Signed-off-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Peng Fan <peng.fan@nxp.com> Link: https://lore.kernel.org/r/20240429214502.1363592-1-festevam@gmail.com Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
1 parent 5224b18 commit 57939f3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/clk/imx/clk-imx8mp-audiomix.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,8 @@ static int clk_imx8mp_audiomix_runtime_resume(struct device *dev)
368368
}
369369

370370
static const struct dev_pm_ops clk_imx8mp_audiomix_pm_ops = {
371-
SET_RUNTIME_PM_OPS(clk_imx8mp_audiomix_runtime_suspend,
372-
clk_imx8mp_audiomix_runtime_resume, NULL)
371+
RUNTIME_PM_OPS(clk_imx8mp_audiomix_runtime_suspend,
372+
clk_imx8mp_audiomix_runtime_resume, NULL)
373373
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
374374
pm_runtime_force_resume)
375375
};
@@ -386,7 +386,7 @@ static struct platform_driver clk_imx8mp_audiomix_driver = {
386386
.driver = {
387387
.name = "imx8mp-audio-blk-ctrl",
388388
.of_match_table = clk_imx8mp_audiomix_of_match,
389-
.pm = &clk_imx8mp_audiomix_pm_ops,
389+
.pm = pm_ptr(&clk_imx8mp_audiomix_pm_ops),
390390
},
391391
};
392392

0 commit comments

Comments
 (0)