aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/codecs/cs42l83-i2c.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2025-03-17 10:54:33 +0100
committerMark Brown <broonie@kernel.org>2025-03-17 10:13:56 +0000
commit850910df7a5ce514f4b4d4d7ba4020abf9254b6d (patch)
treed7f43ef67130d0637e6b00dac47544892a8db2a5 /sound/soc/codecs/cs42l83-i2c.c
parentASoC: cs42l51: Convert to SYSTEM_SLEEP_PM_OPS() (diff)
downloadwireguard-linux-850910df7a5ce514f4b4d4d7ba4020abf9254b6d.tar.xz
wireguard-linux-850910df7a5ce514f4b4d4d7ba4020abf9254b6d.zip
ASoC: cs42l83: 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_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. 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-12-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to '')
-rw-r--r--sound/soc/codecs/cs42l83-i2c.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/codecs/cs42l83-i2c.c b/sound/soc/codecs/cs42l83-i2c.c
index 42c3e1efdc08..53a7fe1ab3dd 100644
--- a/sound/soc/codecs/cs42l83-i2c.c
+++ b/sound/soc/codecs/cs42l83-i2c.c
@@ -199,7 +199,7 @@ static void cs42l83_i2c_remove(struct i2c_client *i2c_client)
cs42l42_common_remove(cs42l83);
}
-static int __maybe_unused cs42l83_i2c_resume(struct device *dev)
+static int cs42l83_i2c_resume(struct device *dev)
{
int ret;
@@ -213,7 +213,7 @@ static int __maybe_unused cs42l83_i2c_resume(struct device *dev)
}
static const struct dev_pm_ops cs42l83_i2c_pm_ops = {
- SET_SYSTEM_SLEEP_PM_OPS(cs42l42_suspend, cs42l83_i2c_resume)
+ SYSTEM_SLEEP_PM_OPS(cs42l42_suspend, cs42l83_i2c_resume)
};
static const struct of_device_id __maybe_unused cs42l83_of_match[] = {
@@ -225,7 +225,7 @@ MODULE_DEVICE_TABLE(of, cs42l83_of_match);
static struct i2c_driver cs42l83_i2c_driver = {
.driver = {
.name = "cs42l83",
- .pm = &cs42l83_i2c_pm_ops,
+ .pm = pm_ptr(&cs42l83_i2c_pm_ops),
.of_match_table = of_match_ptr(cs42l83_of_match),
},
.probe = cs42l83_i2c_probe,