Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: mediatek: mt6797: Convert to RUNTIME_PM_OPS()

Use the newer RUNTIME_PM_OPS() macro 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-65-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Takashi Iwai and committed by
Mark Brown
6afabcda 50ffa9e4

+3 -3
+3 -3
sound/soc/mediatek/mt6797/mt6797-afe-pcm.c
··· 879 879 MODULE_DEVICE_TABLE(of, mt6797_afe_pcm_dt_match); 880 880 881 881 static const struct dev_pm_ops mt6797_afe_pm_ops = { 882 - SET_RUNTIME_PM_OPS(mt6797_afe_runtime_suspend, 883 - mt6797_afe_runtime_resume, NULL) 882 + RUNTIME_PM_OPS(mt6797_afe_runtime_suspend, 883 + mt6797_afe_runtime_resume, NULL) 884 884 }; 885 885 886 886 static struct platform_driver mt6797_afe_pcm_driver = { 887 887 .driver = { 888 888 .name = "mt6797-audio", 889 889 .of_match_table = mt6797_afe_pcm_dt_match, 890 - .pm = &mt6797_afe_pm_ops, 890 + .pm = pm_ptr(&mt6797_afe_pm_ops), 891 891 }, 892 892 .probe = mt6797_afe_pcm_dev_probe, 893 893 .remove = mt6797_afe_pcm_dev_remove,