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: imx-audmux: Switch to SYSTEM_SLEEP_PM_OPS

Replace SET_SYSTEM_SLEEP_PM_OPS() with its modern SYSTEM_SLEEP_PM_OPS()
alternative.

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

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

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

authored by

Fabio Estevam and committed by
Mark Brown
c504885a 8ffb2fe2

+2 -4
+2 -4
sound/soc/fsl/imx-audmux.c
··· 320 320 audmux_debugfs_remove(); 321 321 } 322 322 323 - #ifdef CONFIG_PM_SLEEP 324 323 static int imx_audmux_suspend(struct device *dev) 325 324 { 326 325 int i; ··· 347 348 348 349 return 0; 349 350 } 350 - #endif /* CONFIG_PM_SLEEP */ 351 351 352 352 static const struct dev_pm_ops imx_audmux_pm = { 353 - SET_SYSTEM_SLEEP_PM_OPS(imx_audmux_suspend, imx_audmux_resume) 353 + SYSTEM_SLEEP_PM_OPS(imx_audmux_suspend, imx_audmux_resume) 354 354 }; 355 355 356 356 static struct platform_driver imx_audmux_driver = { ··· 357 359 .remove_new = imx_audmux_remove, 358 360 .driver = { 359 361 .name = DRIVER_NAME, 360 - .pm = &imx_audmux_pm, 362 + .pm = pm_sleep_ptr(&imx_audmux_pm), 361 363 .of_match_table = imx_audmux_dt_ids, 362 364 } 363 365 };