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: fsl_xcvr: 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 runtime suspend/resume() functions are used
at build time or are simply dead code.

This allows removing the __maybe_unused notation from the runtime
suspend/resume() functions.

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

authored by

Fabio Estevam and committed by
Mark Brown
5dfd8f78 fa14065d

+4 -6
+4 -6
sound/soc/fsl/fsl_xcvr.c
··· 1364 1364 pm_runtime_disable(&pdev->dev); 1365 1365 } 1366 1366 1367 - static __maybe_unused int fsl_xcvr_runtime_suspend(struct device *dev) 1367 + static int fsl_xcvr_runtime_suspend(struct device *dev) 1368 1368 { 1369 1369 struct fsl_xcvr *xcvr = dev_get_drvdata(dev); 1370 1370 int ret; ··· 1398 1398 return 0; 1399 1399 } 1400 1400 1401 - static __maybe_unused int fsl_xcvr_runtime_resume(struct device *dev) 1401 + static int fsl_xcvr_runtime_resume(struct device *dev) 1402 1402 { 1403 1403 struct fsl_xcvr *xcvr = dev_get_drvdata(dev); 1404 1404 int ret; ··· 1483 1483 } 1484 1484 1485 1485 static const struct dev_pm_ops fsl_xcvr_pm_ops = { 1486 - SET_RUNTIME_PM_OPS(fsl_xcvr_runtime_suspend, 1487 - fsl_xcvr_runtime_resume, 1488 - NULL) 1486 + RUNTIME_PM_OPS(fsl_xcvr_runtime_suspend, fsl_xcvr_runtime_resume, NULL) 1489 1487 SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 1490 1488 pm_runtime_force_resume) 1491 1489 }; ··· 1492 1494 .probe = fsl_xcvr_probe, 1493 1495 .driver = { 1494 1496 .name = "fsl,imx8mp-audio-xcvr", 1495 - .pm = &fsl_xcvr_pm_ops, 1497 + .pm = pm_ptr(&fsl_xcvr_pm_ops), 1496 1498 .of_match_table = fsl_xcvr_dt_ids, 1497 1499 }, 1498 1500 .remove_new = fsl_xcvr_remove,