summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2025-03-17 10:54:46 +0100
committerMark Brown <broonie@kernel.org>2025-03-17 10:14:08 +0000
commitb352343e448c45940116dc4a089a288fd820dee9 (patch)
treee40f8813bead785a939525f472fba22e09661bba
parentc009893bc5864d55b0b0cc349413a0eaa2bc17cc (diff)
ASoC: max98520: 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 dropping ugly __maybe_unsed attributes. This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-25-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/max98520.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/codecs/max98520.c b/sound/soc/codecs/max98520.c
index 479ded22672e..adf5a898c6df 100644
--- a/sound/soc/codecs/max98520.c
+++ b/sound/soc/codecs/max98520.c
@@ -621,7 +621,7 @@ static int max98520_probe(struct snd_soc_component *component)
return 0;
}
-static int __maybe_unused max98520_suspend(struct device *dev)
+static int max98520_suspend(struct device *dev)
{
struct max98520_priv *max98520 = dev_get_drvdata(dev);
@@ -630,7 +630,7 @@ static int __maybe_unused max98520_suspend(struct device *dev)
return 0;
}
-static int __maybe_unused max98520_resume(struct device *dev)
+static int max98520_resume(struct device *dev)
{
struct max98520_priv *max98520 = dev_get_drvdata(dev);
@@ -641,7 +641,7 @@ static int __maybe_unused max98520_resume(struct device *dev)
}
static const struct dev_pm_ops max98520_pm = {
- SET_SYSTEM_SLEEP_PM_OPS(max98520_suspend, max98520_resume)
+ SYSTEM_SLEEP_PM_OPS(max98520_suspend, max98520_resume)
};
static const struct snd_soc_component_driver soc_codec_dev_max98520 = {
@@ -752,7 +752,7 @@ static struct i2c_driver max98520_i2c_driver = {
.driver = {
.name = "max98520",
.of_match_table = of_match_ptr(max98520_of_match),
- .pm = &max98520_pm,
+ .pm = pm_ptr(&max98520_pm),
},
.probe = max98520_i2c_probe,
.id_table = max98520_i2c_id,