ASoC: cs42l51: Convert to SYSTEM_SLEEP_PM_OPS()
authorTakashi Iwai <tiwai@suse.de>
Mon, 17 Mar 2025 09:54:32 +0000 (10:54 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 17 Mar 2025 10:13:55 +0000 (10:13 +0000)
Use the newer SYSTEM_SLEEP_PM_OPS() macro instead of
SET_SYSTEM_SLEEP_PM_OPS().

Also, drop superfluous __maybe_unused attributes to cs42l51_suspend()
and _resume() functions.

Merely a cleanup, there should be no actual code change.

Cc: patches@opensource.cirrus.com
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250317095603.20073-11-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs42l51-i2c.c
sound/soc/codecs/cs42l51.c

index f171bd66fcac3ece67fc8f11af6dea608071fa02..ba7e237619f2266b2cc85a3507cb7da3d7edf27a 100644 (file)
@@ -40,7 +40,7 @@ static void cs42l51_i2c_remove(struct i2c_client *i2c)
 }
 
 static const struct dev_pm_ops cs42l51_pm_ops = {
-       SET_SYSTEM_SLEEP_PM_OPS(cs42l51_suspend, cs42l51_resume)
+       SYSTEM_SLEEP_PM_OPS(cs42l51_suspend, cs42l51_resume)
 };
 
 static struct i2c_driver cs42l51_i2c_driver = {
index 0602d03095d636d521f375bebed6f0356d6c198e..8083a339dc7bc231ecdbfd4b26fe241094bd453d 100644 (file)
@@ -805,7 +805,7 @@ void cs42l51_remove(struct device *dev)
 }
 EXPORT_SYMBOL_GPL(cs42l51_remove);
 
-int __maybe_unused cs42l51_suspend(struct device *dev)
+int cs42l51_suspend(struct device *dev)
 {
        struct cs42l51_private *cs42l51 = dev_get_drvdata(dev);
 
@@ -816,7 +816,7 @@ int __maybe_unused cs42l51_suspend(struct device *dev)
 }
 EXPORT_SYMBOL_GPL(cs42l51_suspend);
 
-int __maybe_unused cs42l51_resume(struct device *dev)
+int cs42l51_resume(struct device *dev)
 {
        struct cs42l51_private *cs42l51 = dev_get_drvdata(dev);