summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/lpass-tx-macro.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2025-03-17 12:54:41 +0300
committerMark Brown <broonie@kernel.org>2025-03-17 13:14:03 +0300
commitefd74b16af66d3ab2e65a68d6ff171ae2b4ecf21 (patch)
tree5dde55d2de0a9537ac058353df5c17a47228f018 /sound/soc/codecs/lpass-tx-macro.c
parent218b32ca6c63db19ba0f4ad4fe83dc7c18e21bcb (diff)
downloadlinux-efd74b16af66d3ab2e65a68d6ff171ae2b4ecf21.tar.xz
ASoC: lpass: 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-20-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/lpass-tx-macro.c')
-rw-r--r--sound/soc/codecs/lpass-tx-macro.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/codecs/lpass-tx-macro.c b/sound/soc/codecs/lpass-tx-macro.c
index a134584acf90..27bae58f4072 100644
--- a/sound/soc/codecs/lpass-tx-macro.c
+++ b/sound/soc/codecs/lpass-tx-macro.c
@@ -2400,7 +2400,7 @@ static void tx_macro_remove(struct platform_device *pdev)
lpass_macro_pds_exit(tx->pds);
}
-static int __maybe_unused tx_macro_runtime_suspend(struct device *dev)
+static int tx_macro_runtime_suspend(struct device *dev)
{
struct tx_macro *tx = dev_get_drvdata(dev);
@@ -2414,7 +2414,7 @@ static int __maybe_unused tx_macro_runtime_suspend(struct device *dev)
return 0;
}
-static int __maybe_unused tx_macro_runtime_resume(struct device *dev)
+static int tx_macro_runtime_resume(struct device *dev)
{
struct tx_macro *tx = dev_get_drvdata(dev);
int ret;
@@ -2450,7 +2450,7 @@ err_npl:
}
static const struct dev_pm_ops tx_macro_pm_ops = {
- SET_RUNTIME_PM_OPS(tx_macro_runtime_suspend, tx_macro_runtime_resume, NULL)
+ RUNTIME_PM_OPS(tx_macro_runtime_suspend, tx_macro_runtime_resume, NULL)
};
static const struct tx_macro_data lpass_ver_9 = {
@@ -2531,7 +2531,7 @@ static struct platform_driver tx_macro_driver = {
.name = "tx_macro",
.of_match_table = tx_macro_dt_match,
.suppress_bind_attrs = true,
- .pm = &tx_macro_pm_ops,
+ .pm = pm_ptr(&tx_macro_pm_ops),
},
.probe = tx_macro_probe,
.remove = tx_macro_remove,