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

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: fsl_rpmsg: Switch to RUNTIME_PM_OPS()

Replace SET_RUNTIME_PM_OPS() with its modern RUNTIME_PM_OPS()
alternative.

The combined usage of pm_ptr() and RUNTIME_PM_OPS() allows the
compiler to evaluate if the runtime suspend/resume() functions
are used at build time or are simply dead code.

This allows removing the CONFIG_PM ifdefery from the runtime
suspend/resume() functions.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Link: https://patch.msgid.link/20240808184944.267686-3-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Fabio Estevam and committed by
Mark Brown
bbc0798c b7e4dd8d

+3 -6
+3 -6
sound/soc/fsl/fsl_rpmsg.c
··· 286 286 platform_device_unregister(rpmsg->card_pdev); 287 287 } 288 288 289 - #ifdef CONFIG_PM 290 289 static int fsl_rpmsg_runtime_resume(struct device *dev) 291 290 { 292 291 struct fsl_rpmsg *rpmsg = dev_get_drvdata(dev); ··· 320 321 321 322 return 0; 322 323 } 323 - #endif 324 324 325 325 static const struct dev_pm_ops fsl_rpmsg_pm_ops = { 326 - SET_RUNTIME_PM_OPS(fsl_rpmsg_runtime_suspend, 327 - fsl_rpmsg_runtime_resume, 328 - NULL) 326 + RUNTIME_PM_OPS(fsl_rpmsg_runtime_suspend, fsl_rpmsg_runtime_resume, 327 + NULL) 329 328 }; 330 329 331 330 static struct platform_driver fsl_rpmsg_driver = { ··· 331 334 .remove_new = fsl_rpmsg_remove, 332 335 .driver = { 333 336 .name = "fsl_rpmsg", 334 - .pm = &fsl_rpmsg_pm_ops, 337 + .pm = pm_ptr(&fsl_rpmsg_pm_ops), 335 338 .of_match_table = fsl_rpmsg_ids, 336 339 }, 337 340 };