aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/codecs/da7213.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2025-03-17 10:54:39 +0100
committerMark Brown <broonie@kernel.org>2025-03-17 10:14:01 +0000
commit948cf1681e2ee077969df1e672f4c4d856059937 (patch)
tree8f8e023d99915b1b6edbe7c26b0464c680e1a2d7 /sound/soc/codecs/da7213.c
parentASoC: cx2072x: Convert to RUNTIME_PM_OPS() & co (diff)
downloadwireguard-linux-948cf1681e2ee077969df1e672f4c4d856059937.tar.xz
wireguard-linux-948cf1681e2ee077969df1e672f4c4d856059937.zip
ASoC: da7213: Convert to RUNTIME_PM_OPS() & co
Use the newer RUNTIME_PM_OPS() and SYSTEM_SLEEP_PM_OPS() macros instead of SET_RUNTIME_PM_OPS() and 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: support.opensource@diasemi.com Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-18-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to '')
-rw-r--r--sound/soc/codecs/da7213.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/codecs/da7213.c b/sound/soc/codecs/da7213.c
index eb97ac73ec06..a4496cc26902 100644
--- a/sound/soc/codecs/da7213.c
+++ b/sound/soc/codecs/da7213.c
@@ -2224,7 +2224,7 @@ static void da7213_i2c_remove(struct i2c_client *i2c)
pm_runtime_disable(&i2c->dev);
}
-static int __maybe_unused da7213_runtime_suspend(struct device *dev)
+static int da7213_runtime_suspend(struct device *dev)
{
struct da7213_priv *da7213 = dev_get_drvdata(dev);
@@ -2235,7 +2235,7 @@ static int __maybe_unused da7213_runtime_suspend(struct device *dev)
return 0;
}
-static int __maybe_unused da7213_runtime_resume(struct device *dev)
+static int da7213_runtime_resume(struct device *dev)
{
struct da7213_priv *da7213 = dev_get_drvdata(dev);
int ret;
@@ -2248,8 +2248,8 @@ static int __maybe_unused da7213_runtime_resume(struct device *dev)
}
static const struct dev_pm_ops da7213_pm = {
- SET_RUNTIME_PM_OPS(da7213_runtime_suspend, da7213_runtime_resume, NULL)
- SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
+ RUNTIME_PM_OPS(da7213_runtime_suspend, da7213_runtime_resume, NULL)
+ SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
};
static const struct i2c_device_id da7213_i2c_id[] = {
@@ -2264,7 +2264,7 @@ static struct i2c_driver da7213_i2c_driver = {
.name = "da7213",
.of_match_table = of_match_ptr(da7213_of_match),
.acpi_match_table = ACPI_PTR(da7213_acpi_match),
- .pm = &da7213_pm,
+ .pm = pm_ptr(&da7213_pm),
},
.probe = da7213_i2c_probe,
.remove = da7213_i2c_remove,