summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2025-03-17 10:54:48 +0100
committerMark Brown <broonie@kernel.org>2025-03-17 10:14:09 +0000
commit113d29a94410ff292be090949c43911b11c4d32a (patch)
tree8c9292930aa277e6506e1cf7e224bf1a046c412e
parentd0029e0a78672932367478e5b3479edfa2738ec0 (diff)
ASoC: max98927: 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 superfluous CONFIG_PM_SLEEP ifdefs. 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-27-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/max98927.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/soc/codecs/max98927.c b/sound/soc/codecs/max98927.c
index 747aa6f1d54f..55cc18451a2d 100644
--- a/sound/soc/codecs/max98927.c
+++ b/sound/soc/codecs/max98927.c
@@ -731,7 +731,6 @@ static int max98927_probe(struct snd_soc_component *component)
return 0;
}
-#ifdef CONFIG_PM_SLEEP
static int max98927_suspend(struct device *dev)
{
struct max98927_priv *max98927 = dev_get_drvdata(dev);
@@ -750,10 +749,9 @@ static int max98927_resume(struct device *dev)
regcache_sync(max98927->regmap);
return 0;
}
-#endif
static const struct dev_pm_ops max98927_pm = {
- SET_SYSTEM_SLEEP_PM_OPS(max98927_suspend, max98927_resume)
+ SYSTEM_SLEEP_PM_OPS(max98927_suspend, max98927_resume)
};
static const struct snd_soc_component_driver soc_component_dev_max98927 = {
@@ -902,7 +900,7 @@ static struct i2c_driver max98927_i2c_driver = {
.name = "max98927",
.of_match_table = of_match_ptr(max98927_of_match),
.acpi_match_table = ACPI_PTR(max98927_acpi_match),
- .pm = &max98927_pm,
+ .pm = pm_ptr(&max98927_pm),
},
.probe = max98927_i2c_probe,
.remove = max98927_i2c_remove,