Skip to content

Commit 4330d33

Browse files
tiwaibroonie
authored andcommitted
ASoC: rcar: Convert to SYSTEM_SLEEP_PM_OPS()
Use the newer SYSTEM_SLEEP_PM_OPS() macro instead of SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us to drop ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-75-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 23a6b07 commit 4330d33

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

sound/soc/renesas/rcar/core.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2059,7 +2059,7 @@ static void rsnd_remove(struct platform_device *pdev)
20592059
remove_func[i](priv);
20602060
}
20612061

2062-
static int __maybe_unused rsnd_suspend(struct device *dev)
2062+
static int rsnd_suspend(struct device *dev)
20632063
{
20642064
struct rsnd_priv *priv = dev_get_drvdata(dev);
20652065

@@ -2068,21 +2068,21 @@ static int __maybe_unused rsnd_suspend(struct device *dev)
20682068
return 0;
20692069
}
20702070

2071-
static int __maybe_unused rsnd_resume(struct device *dev)
2071+
static int rsnd_resume(struct device *dev)
20722072
{
20732073
struct rsnd_priv *priv = dev_get_drvdata(dev);
20742074

20752075
return rsnd_adg_clk_enable(priv);
20762076
}
20772077

20782078
static const struct dev_pm_ops rsnd_pm_ops = {
2079-
SET_SYSTEM_SLEEP_PM_OPS(rsnd_suspend, rsnd_resume)
2079+
SYSTEM_SLEEP_PM_OPS(rsnd_suspend, rsnd_resume)
20802080
};
20812081

20822082
static struct platform_driver rsnd_driver = {
20832083
.driver = {
20842084
.name = "rcar_sound",
2085-
.pm = &rsnd_pm_ops,
2085+
.pm = pm_ptr(&rsnd_pm_ops),
20862086
.of_match_table = rsnd_of_match,
20872087
},
20882088
.probe = rsnd_probe,

0 commit comments

Comments
 (0)