diff options
| author | Takashi Iwai <[email protected]> | 2025-03-17 09:54:41 +0000 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2025-03-17 10:14:03 +0000 |
| commit | efd74b16af66d3ab2e65a68d6ff171ae2b4ecf21 (patch) | |
| tree | 5dde55d2de0a9537ac058353df5c17a47228f018 /sound/soc/codecs/lpass-va-macro.c | |
| parent | ASoC: hdac_hdmi: Convert to RUNTIME_PM_OPS() & co (diff) | |
| download | kernel-efd74b16af66d3ab2e65a68d6ff171ae2b4ecf21.tar.gz kernel-efd74b16af66d3ab2e65a68d6ff171ae2b4ecf21.zip | |
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 <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
Reviewed-by: Charles Keepax <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'sound/soc/codecs/lpass-va-macro.c')
| -rw-r--r-- | sound/soc/codecs/lpass-va-macro.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/codecs/lpass-va-macro.c b/sound/soc/codecs/lpass-va-macro.c index c781da476240..74ada6e77526 100644 --- a/sound/soc/codecs/lpass-va-macro.c +++ b/sound/soc/codecs/lpass-va-macro.c @@ -1674,7 +1674,7 @@ static void va_macro_remove(struct platform_device *pdev) lpass_macro_pds_exit(va->pds); } -static int __maybe_unused va_macro_runtime_suspend(struct device *dev) +static int va_macro_runtime_suspend(struct device *dev) { struct va_macro *va = dev_get_drvdata(dev); @@ -1689,7 +1689,7 @@ static int __maybe_unused va_macro_runtime_suspend(struct device *dev) return 0; } -static int __maybe_unused va_macro_runtime_resume(struct device *dev) +static int va_macro_runtime_resume(struct device *dev) { struct va_macro *va = dev_get_drvdata(dev); int ret; @@ -1717,7 +1717,7 @@ static int __maybe_unused va_macro_runtime_resume(struct device *dev) static const struct dev_pm_ops va_macro_pm_ops = { - SET_RUNTIME_PM_OPS(va_macro_runtime_suspend, va_macro_runtime_resume, NULL) + RUNTIME_PM_OPS(va_macro_runtime_suspend, va_macro_runtime_resume, NULL) }; static const struct of_device_id va_macro_dt_match[] = { @@ -1735,7 +1735,7 @@ static struct platform_driver va_macro_driver = { .name = "va_macro", .of_match_table = va_macro_dt_match, .suppress_bind_attrs = true, - .pm = &va_macro_pm_ops, + .pm = pm_ptr(&va_macro_pm_ops), }, .probe = va_macro_probe, .remove = va_macro_remove, |
