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

authored by

Fabio Estevam and committed by
Mark Brown
fa14065d 560495c0

+4 -6
+4 -6
sound/soc/fsl/fsl_easrc.c
··· 1988 1988 pm_runtime_disable(&pdev->dev); 1989 1989 } 1990 1990 1991 - static __maybe_unused int fsl_easrc_runtime_suspend(struct device *dev) 1991 + static int fsl_easrc_runtime_suspend(struct device *dev) 1992 1992 { 1993 1993 struct fsl_asrc *easrc = dev_get_drvdata(dev); 1994 1994 struct fsl_easrc_priv *easrc_priv = easrc->private; ··· 2005 2005 return 0; 2006 2006 } 2007 2007 2008 - static __maybe_unused int fsl_easrc_runtime_resume(struct device *dev) 2008 + static int fsl_easrc_runtime_resume(struct device *dev) 2009 2009 { 2010 2010 struct fsl_asrc *easrc = dev_get_drvdata(dev); 2011 2011 struct fsl_easrc_priv *easrc_priv = easrc->private; ··· 2086 2086 } 2087 2087 2088 2088 static const struct dev_pm_ops fsl_easrc_pm_ops = { 2089 - SET_RUNTIME_PM_OPS(fsl_easrc_runtime_suspend, 2090 - fsl_easrc_runtime_resume, 2091 - NULL) 2089 + RUNTIME_PM_OPS(fsl_easrc_runtime_suspend, fsl_easrc_runtime_resume, NULL) 2092 2090 SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 2093 2091 pm_runtime_force_resume) 2094 2092 }; ··· 2096 2098 .remove_new = fsl_easrc_remove, 2097 2099 .driver = { 2098 2100 .name = "fsl-easrc", 2099 - .pm = &fsl_easrc_pm_ops, 2101 + .pm = pm_ptr(&fsl_easrc_pm_ops), 2100 2102 .of_match_table = fsl_easrc_dt_ids, 2101 2103 }, 2102 2104 };