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

ASoC: mediatek: mt7986: 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-66-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Takashi Iwai and committed by
Mark Brown
0d7c63bc 6afabcda

+3 -3
+3 -3
sound/soc/mediatek/mt7986/mt7986-afe-pcm.c
··· 589 589 MODULE_DEVICE_TABLE(of, mt7986_afe_pcm_dt_match); 590 590 591 591 static const struct dev_pm_ops mt7986_afe_pm_ops = { 592 - SET_RUNTIME_PM_OPS(mt7986_afe_runtime_suspend, 593 - mt7986_afe_runtime_resume, NULL) 592 + RUNTIME_PM_OPS(mt7986_afe_runtime_suspend, 593 + mt7986_afe_runtime_resume, NULL) 594 594 }; 595 595 596 596 static struct platform_driver mt7986_afe_pcm_driver = { 597 597 .driver = { 598 598 .name = "mt7986-audio", 599 599 .of_match_table = mt7986_afe_pcm_dt_match, 600 - .pm = &mt7986_afe_pm_ops, 600 + .pm = pm_ptr(&mt7986_afe_pm_ops), 601 601 }, 602 602 .probe = mt7986_afe_pcm_dev_probe, 603 603 .remove = mt7986_afe_pcm_dev_remove,