aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2025-03-17 10:55:18 +0100
committerMark Brown <broonie@kernel.org>2025-03-17 10:14:36 +0000
commitd09125c2c68cc95c300e2a63a04b9a3d37ba64ad (patch)
tree55a28a4a2d487e671d312f3ceeb83d42958e21a7
parentASoC: wsa881x: Convert to RUNTIME_PM_OPS() (diff)
downloadwireguard-linux-d09125c2c68cc95c300e2a63a04b9a3d37ba64ad.tar.xz
wireguard-linux-d09125c2c68cc95c300e2a63a04b9a3d37ba64ad.zip
ASoC: wsa883x: 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: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-57-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to '')
-rw-r--r--sound/soc/codecs/wsa883x.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/codecs/wsa883x.c b/sound/soc/codecs/wsa883x.c
index a5a6cb90bb43..d259e1d4d83d 100644
--- a/sound/soc/codecs/wsa883x.c
+++ b/sound/soc/codecs/wsa883x.c
@@ -1636,7 +1636,7 @@ err:
}
-static int __maybe_unused wsa883x_runtime_suspend(struct device *dev)
+static int wsa883x_runtime_suspend(struct device *dev)
{
struct regmap *regmap = dev_get_regmap(dev, NULL);
@@ -1646,7 +1646,7 @@ static int __maybe_unused wsa883x_runtime_suspend(struct device *dev)
return 0;
}
-static int __maybe_unused wsa883x_runtime_resume(struct device *dev)
+static int wsa883x_runtime_resume(struct device *dev)
{
struct regmap *regmap = dev_get_regmap(dev, NULL);
@@ -1657,7 +1657,7 @@ static int __maybe_unused wsa883x_runtime_resume(struct device *dev)
}
static const struct dev_pm_ops wsa883x_pm_ops = {
- SET_RUNTIME_PM_OPS(wsa883x_runtime_suspend, wsa883x_runtime_resume, NULL)
+ RUNTIME_PM_OPS(wsa883x_runtime_suspend, wsa883x_runtime_resume, NULL)
};
static const struct sdw_device_id wsa883x_swr_id[] = {
@@ -1670,7 +1670,7 @@ MODULE_DEVICE_TABLE(sdw, wsa883x_swr_id);
static struct sdw_driver wsa883x_codec_driver = {
.driver = {
.name = "wsa883x-codec",
- .pm = &wsa883x_pm_ops,
+ .pm = pm_ptr(&wsa883x_pm_ops),
.suppress_bind_attrs = true,
},
.probe = wsa883x_probe,