diff options
author | Takashi Iwai <tiwai@suse.de> | 2025-03-17 10:55:07 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2025-03-17 10:14:26 +0000 |
commit | 1570c33f2f38b6dff04ee1c7d7b38d1702e81b5f (patch) | |
tree | 98cf9d71aa2317e94c3c76b52f84a947fc792ad6 | |
parent | 9eb264d115a55eb40b55c7481c113e6c56560700 (diff) |
ASoC: tas2552: 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 superfluous CONFIG_PM
ifdefs.
This optimizes slightly when CONFIG_PM is disabled, too.
Cc: Shenghao Ding <shenghao-ding@ti.com>
Cc: Kevin Lu <kevin-lu@ti.com>
Cc: Baojun Xu <baojun.xu@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250317095603.20073-46-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/codecs/tas2552.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c index 684d52ec6600..b56dd279d90a 100644 --- a/sound/soc/codecs/tas2552.c +++ b/sound/soc/codecs/tas2552.c @@ -138,7 +138,6 @@ static const struct snd_soc_dapm_route tas2552_audio_map[] = { {"ASI OUT", NULL, "DMIC"} }; -#ifdef CONFIG_PM static void tas2552_sw_shutdown(struct tas2552_data *tas2552, int sw_shutdown) { u8 cfg1_reg = 0; @@ -152,7 +151,6 @@ static void tas2552_sw_shutdown(struct tas2552_data *tas2552, int sw_shutdown) snd_soc_component_update_bits(tas2552->component, TAS2552_CFG_1, TAS2552_SWS, cfg1_reg); } -#endif static int tas2552_setup_pll(struct snd_soc_component *component, struct snd_pcm_hw_params *params) @@ -480,7 +478,6 @@ static int tas2552_mute(struct snd_soc_dai *dai, int mute, int direction) return 0; } -#ifdef CONFIG_PM static int tas2552_runtime_suspend(struct device *dev) { struct tas2552_data *tas2552 = dev_get_drvdata(dev); @@ -508,11 +505,9 @@ static int tas2552_runtime_resume(struct device *dev) return 0; } -#endif static const struct dev_pm_ops tas2552_pm = { - SET_RUNTIME_PM_OPS(tas2552_runtime_suspend, tas2552_runtime_resume, - NULL) + RUNTIME_PM_OPS(tas2552_runtime_suspend, tas2552_runtime_resume, NULL) }; static const struct snd_soc_dai_ops tas2552_speaker_dai_ops = { @@ -768,7 +763,7 @@ static struct i2c_driver tas2552_i2c_driver = { .driver = { .name = "tas2552", .of_match_table = of_match_ptr(tas2552_of_match), - .pm = &tas2552_pm, + .pm = pm_ptr(&tas2552_pm), }, .probe = tas2552_probe, .remove = tas2552_i2c_remove, |