]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: sunxi: Convert to RUNTIME_PM_OPS()
authorTakashi Iwai <tiwai@suse.de>
Mon, 17 Mar 2025 09:55:43 +0000 (10:55 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 17 Mar 2025 10:14:59 +0000 (10:14 +0000)
Use the newer RUNTIME_PM_OPS() instead of SET_RUNTIME_PM_OPS()
together with pm_ptr().

This optimizes slightly when CONFIG_PM is disabled, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250317095603.20073-82-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sunxi/sun4i-spdif.c
sound/soc/sunxi/sun50i-dmic.c
sound/soc/sunxi/sun8i-codec.c

index 41caf1795d09bb7d156b02e9cf58cd56fa65dcd1..34e5bd94e9af66cbc4346f3464e44ce4d8835caf 100644 (file)
@@ -727,15 +727,15 @@ static void sun4i_spdif_remove(struct platform_device *pdev)
 }
 
 static const struct dev_pm_ops sun4i_spdif_pm = {
-       SET_RUNTIME_PM_OPS(sun4i_spdif_runtime_suspend,
-                          sun4i_spdif_runtime_resume, NULL)
+       RUNTIME_PM_OPS(sun4i_spdif_runtime_suspend,
+                      sun4i_spdif_runtime_resume, NULL)
 };
 
 static struct platform_driver sun4i_spdif_driver = {
        .driver         = {
                .name   = "sun4i-spdif",
                .of_match_table = sun4i_spdif_of_match,
-               .pm     = &sun4i_spdif_pm,
+               .pm     = pm_ptr(&sun4i_spdif_pm),
        },
        .probe          = sun4i_spdif_probe,
        .remove         = sun4i_spdif_remove,
index 3e751b5694fe344e1ef10a8455d5edac084142f7..bab1e29c99887c93e0086f97d19a896eb09e322e 100644 (file)
@@ -415,15 +415,15 @@ static void sun50i_dmic_remove(struct platform_device *pdev)
 }
 
 static const struct dev_pm_ops sun50i_dmic_pm = {
-       SET_RUNTIME_PM_OPS(sun50i_dmic_runtime_suspend,
-                          sun50i_dmic_runtime_resume, NULL)
+       RUNTIME_PM_OPS(sun50i_dmic_runtime_suspend,
+                      sun50i_dmic_runtime_resume, NULL)
 };
 
 static struct platform_driver sun50i_dmic_driver = {
        .driver         = {
                .name   = "sun50i-dmic",
                .of_match_table = sun50i_dmic_of_match,
-               .pm     = &sun50i_dmic_pm,
+               .pm     = pm_ptr(&sun50i_dmic_pm),
        },
        .probe          = sun50i_dmic_probe,
        .remove         = sun50i_dmic_remove,
index 8c645e04d571eaa3e545ee9a94d93485e5bd9787..8b9eb1a202f7dcc57bc0c0b95e175fd0481588c5 100644 (file)
@@ -1702,15 +1702,15 @@ static const struct of_device_id sun8i_codec_of_match[] = {
 MODULE_DEVICE_TABLE(of, sun8i_codec_of_match);
 
 static const struct dev_pm_ops sun8i_codec_pm_ops = {
-       SET_RUNTIME_PM_OPS(sun8i_codec_runtime_suspend,
-                          sun8i_codec_runtime_resume, NULL)
+       RUNTIME_PM_OPS(sun8i_codec_runtime_suspend,
+                      sun8i_codec_runtime_resume, NULL)
 };
 
 static struct platform_driver sun8i_codec_driver = {
        .driver = {
                .name = "sun8i-codec",
                .of_match_table = sun8i_codec_of_match,
-               .pm = &sun8i_codec_pm_ops,
+               .pm = pm_ptr(&sun8i_codec_pm_ops),
        },
        .probe = sun8i_codec_probe,
        .remove = sun8i_codec_remove,