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

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

authored by

Takashi Iwai and committed by
Mark Brown
50ffa9e4 2c498d9a

+3 -3
+3 -3
sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
··· 1462 1462 MODULE_DEVICE_TABLE(of, mt2701_afe_pcm_dt_match); 1463 1463 1464 1464 static const struct dev_pm_ops mt2701_afe_pm_ops = { 1465 - SET_RUNTIME_PM_OPS(mt2701_afe_runtime_suspend, 1466 - mt2701_afe_runtime_resume, NULL) 1465 + RUNTIME_PM_OPS(mt2701_afe_runtime_suspend, 1466 + mt2701_afe_runtime_resume, NULL) 1467 1467 }; 1468 1468 1469 1469 static struct platform_driver mt2701_afe_pcm_driver = { 1470 1470 .driver = { 1471 1471 .name = "mt2701-audio", 1472 1472 .of_match_table = mt2701_afe_pcm_dt_match, 1473 - .pm = &mt2701_afe_pm_ops, 1473 + .pm = pm_ptr(&mt2701_afe_pm_ops), 1474 1474 }, 1475 1475 .probe = mt2701_afe_pcm_dev_probe, 1476 1476 .remove = mt2701_afe_pcm_dev_remove,