aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/codecs/cs4234.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2025-03-17 10:54:30 +0100
committerMark Brown <broonie@kernel.org>2025-03-17 10:13:53 +0000
commitfd24b93ebaa1be78bf683a6a0599856eda367155 (patch)
tree53907cfcf39008bceb5ea814e0156edf4f828e40 /sound/soc/codecs/cs4234.c
parentASoC: cs35l34: Convert to RUNTIME_PM_OPS() (diff)
downloadwireguard-linux-fd24b93ebaa1be78bf683a6a0599856eda367155.tar.xz
wireguard-linux-fd24b93ebaa1be78bf683a6a0599856eda367155.zip
ASoC: cs4234: Convert to RUNTIME_PM_OPS()
Use the newer RUNTIME_PM_OPS() macro instead of SET_RUNTIME_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-9-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/cs4234.c')
-rw-r--r--sound/soc/codecs/cs4234.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/codecs/cs4234.c b/sound/soc/codecs/cs4234.c
index df160db5bbb5..dda7f5b4f2fb 100644
--- a/sound/soc/codecs/cs4234.c
+++ b/sound/soc/codecs/cs4234.c
@@ -860,7 +860,7 @@ static void cs4234_i2c_remove(struct i2c_client *i2c_client)
cs4234_shutdown(cs4234);
}
-static int __maybe_unused cs4234_runtime_resume(struct device *dev)
+static int cs4234_runtime_resume(struct device *dev)
{
struct cs4234 *cs4234 = dev_get_drvdata(dev);
int ret;
@@ -881,7 +881,7 @@ static int __maybe_unused cs4234_runtime_resume(struct device *dev)
return 0;
}
-static int __maybe_unused cs4234_runtime_suspend(struct device *dev)
+static int cs4234_runtime_suspend(struct device *dev)
{
struct cs4234 *cs4234 = dev_get_drvdata(dev);
@@ -891,7 +891,7 @@ static int __maybe_unused cs4234_runtime_suspend(struct device *dev)
}
static const struct dev_pm_ops cs4234_pm = {
- SET_RUNTIME_PM_OPS(cs4234_runtime_suspend, cs4234_runtime_resume, NULL)
+ RUNTIME_PM_OPS(cs4234_runtime_suspend, cs4234_runtime_resume, NULL)
};
static const struct of_device_id cs4234_of_match[] = {
@@ -903,7 +903,7 @@ MODULE_DEVICE_TABLE(of, cs4234_of_match);
static struct i2c_driver cs4234_i2c_driver = {
.driver = {
.name = "cs4234",
- .pm = &cs4234_pm,
+ .pm = pm_ptr(&cs4234_pm),
.of_match_table = cs4234_of_match,
},
.probe = cs4234_i2c_probe,