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

ASoC: samsung: Convert to RUNTIME_PM_OPS() & co

Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros
instead of SET_RUNTIME_PM_OPS() and SET_SYSTEM_SLEEP_PM_OPS() together
with pm_ptr(), which allows us to drop superfluous CONFIG_PM ifdefs.

This optimizes slightly when CONFIG_PM is disabled, too.

Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250317095603.20073-77-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Takashi Iwai and committed by
Mark Brown
692fc8ac 43a29303

+3 -7
+3 -7
sound/soc/samsung/i2s.c
··· 1216 1216 return 0; 1217 1217 } 1218 1218 1219 - #ifdef CONFIG_PM 1220 1219 static int i2s_runtime_suspend(struct device *dev) 1221 1220 { 1222 1221 struct samsung_i2s_priv *priv = dev_get_drvdata(dev); ··· 1253 1254 1254 1255 return 0; 1255 1256 } 1256 - #endif /* CONFIG_PM */ 1257 1257 1258 1258 static void i2s_unregister_clocks(struct samsung_i2s_priv *priv) 1259 1259 { ··· 1731 1733 #endif 1732 1734 1733 1735 static const struct dev_pm_ops samsung_i2s_pm = { 1734 - SET_RUNTIME_PM_OPS(i2s_runtime_suspend, 1735 - i2s_runtime_resume, NULL) 1736 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 1737 - pm_runtime_force_resume) 1736 + RUNTIME_PM_OPS(i2s_runtime_suspend, i2s_runtime_resume, NULL) 1737 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 1738 1738 }; 1739 1739 1740 1740 static struct platform_driver samsung_i2s_driver = { ··· 1742 1746 .driver = { 1743 1747 .name = "samsung-i2s", 1744 1748 .of_match_table = of_match_ptr(exynos_i2s_match), 1745 - .pm = &samsung_i2s_pm, 1749 + .pm = pm_ptr(&samsung_i2s_pm), 1746 1750 }, 1747 1751 }; 1748 1752