Skip to content

Commit 692fc8a

Browse files
tiwaibroonie
authored andcommitted
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>
1 parent 43a2930 commit 692fc8a

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

sound/soc/samsung/i2s.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,7 +1216,6 @@ static int i2s_alloc_dais(struct samsung_i2s_priv *priv,
12161216
return 0;
12171217
}
12181218

1219-
#ifdef CONFIG_PM
12201219
static int i2s_runtime_suspend(struct device *dev)
12211220
{
12221221
struct samsung_i2s_priv *priv = dev_get_drvdata(dev);
@@ -1254,7 +1253,6 @@ static int i2s_runtime_resume(struct device *dev)
12541253

12551254
return 0;
12561255
}
1257-
#endif /* CONFIG_PM */
12581256

12591257
static void i2s_unregister_clocks(struct samsung_i2s_priv *priv)
12601258
{
@@ -1733,10 +1731,8 @@ MODULE_DEVICE_TABLE(of, exynos_i2s_match);
17331731
#endif
17341732

17351733
static const struct dev_pm_ops samsung_i2s_pm = {
1736-
SET_RUNTIME_PM_OPS(i2s_runtime_suspend,
1737-
i2s_runtime_resume, NULL)
1738-
SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
1739-
pm_runtime_force_resume)
1734+
RUNTIME_PM_OPS(i2s_runtime_suspend, i2s_runtime_resume, NULL)
1735+
SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
17401736
};
17411737

17421738
static struct platform_driver samsung_i2s_driver = {
@@ -1746,7 +1742,7 @@ static struct platform_driver samsung_i2s_driver = {
17461742
.driver = {
17471743
.name = "samsung-i2s",
17481744
.of_match_table = of_match_ptr(exynos_i2s_match),
1749-
.pm = &samsung_i2s_pm,
1745+
.pm = pm_ptr(&samsung_i2s_pm),
17501746
},
17511747
};
17521748

0 commit comments

Comments
 (0)