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_aud2htx: 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-1-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Fabio Estevam and committed by
Mark Brown
560495c0 8951ae0b

+5 -6
+5 -6
sound/soc/fsl/fsl_aud2htx.c
··· 261 261 pm_runtime_disable(&pdev->dev); 262 262 } 263 263 264 - static int __maybe_unused fsl_aud2htx_runtime_suspend(struct device *dev) 264 + static int fsl_aud2htx_runtime_suspend(struct device *dev) 265 265 { 266 266 struct fsl_aud2htx *aud2htx = dev_get_drvdata(dev); 267 267 ··· 271 271 return 0; 272 272 } 273 273 274 - static int __maybe_unused fsl_aud2htx_runtime_resume(struct device *dev) 274 + static int fsl_aud2htx_runtime_resume(struct device *dev) 275 275 { 276 276 struct fsl_aud2htx *aud2htx = dev_get_drvdata(dev); 277 277 int ret; ··· 288 288 } 289 289 290 290 static const struct dev_pm_ops fsl_aud2htx_pm_ops = { 291 - SET_RUNTIME_PM_OPS(fsl_aud2htx_runtime_suspend, 292 - fsl_aud2htx_runtime_resume, 293 - NULL) 291 + RUNTIME_PM_OPS(fsl_aud2htx_runtime_suspend, fsl_aud2htx_runtime_resume, 292 + NULL) 294 293 SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 295 294 pm_runtime_force_resume) 296 295 }; ··· 299 300 .remove_new = fsl_aud2htx_remove, 300 301 .driver = { 301 302 .name = "fsl-aud2htx", 302 - .pm = &fsl_aud2htx_pm_ops, 303 + .pm = pm_ptr(&fsl_aud2htx_pm_ops), 303 304 .of_match_table = fsl_aud2htx_dt_ids, 304 305 }, 305 306 };