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

ASoC: codecs: cs53l30: convert to snd_soc_dapm_xxx()

This patch converts below functions.

dapm->dev -> snd_soc_dapm_to_dev()
dapm->card -> snd_soc_dapm_to_card()
dapm->component -> snd_soc_dapm_to_component()

dapm_kcontrol_get_value() -> snd_soc_dapm_kcontrol_get_value()

snd_soc_component_enable_pin() -> snd_soc_dapm_enable_pin()
snd_soc_component_enable_pin_unlocked() -> snd_soc_dapm_enable_pin_unlocked()
snd_soc_component_disable_pin() -> snd_soc_dapm_disable_pin()
snd_soc_component_disable_pin_unlocked() -> snd_soc_dapm_disable_pin_unlocked()
snd_soc_component_nc_pin() -> snd_soc_dapm_nc_pin()
snd_soc_component_nc_pin_unlocked() -> snd_soc_dapm_nc_pin_unlocked()
snd_soc_component_get_pin_status() -> snd_soc_dapm_get_pin_status()
snd_soc_component_force_enable_pin() -> snd_soc_dapm_force_enable_pin()
snd_soc_component_force_enable_pin_unlocked() -> snd_soc_dapm_force_enable_pin_unlocked()
snd_soc_component_force_bias_level() -> snd_soc_dapm_force_bias_level()
snd_soc_component_get_bias_level() -> snd_soc_dapm_get_bias_level()
snd_soc_component_init_bias_level() -> snd_soc_dapm_init_bias_level()
snd_soc_component_get_dapm() -> snd_soc_component_to_dapm()

snd_soc_dapm_kcontrol_component() -> snd_soc_dapm_kcontrol_to_component()
snd_soc_dapm_kcontrol_widget() -> snd_soc_dapm_kcontrol_to_widget()
snd_soc_dapm_kcontrol_dapm() -> snd_soc_dapm_kcontrol_to_dapm()
snd_soc_dapm_np_pin() -> snd_soc_dapm_disable_pin()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/87a50t771v.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Kuninori Morimoto and committed by
Mark Brown
fa2defb8 7fdcd1d1

+5 -4
+5 -4
sound/soc/codecs/cs53l30.c
··· 649 649 static int cs53l30_set_bias_level(struct snd_soc_component *component, 650 650 enum snd_soc_bias_level level) 651 651 { 652 - struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); 652 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); 653 653 struct cs53l30_private *priv = snd_soc_component_get_drvdata(component); 654 + enum snd_soc_bias_level bias_level = snd_soc_dapm_get_bias_level(dapm); 654 655 unsigned int reg; 655 656 int i, inter_max_check, ret; 656 657 ··· 659 658 case SND_SOC_BIAS_ON: 660 659 break; 661 660 case SND_SOC_BIAS_PREPARE: 662 - if (dapm->bias_level == SND_SOC_BIAS_STANDBY) 661 + if (bias_level == SND_SOC_BIAS_STANDBY) 663 662 regmap_update_bits(priv->regmap, CS53L30_PWRCTL, 664 663 CS53L30_PDN_LP_MASK, 0); 665 664 break; 666 665 case SND_SOC_BIAS_STANDBY: 667 - if (dapm->bias_level == SND_SOC_BIAS_OFF) { 666 + if (bias_level == SND_SOC_BIAS_OFF) { 668 667 ret = clk_prepare_enable(priv->mclk); 669 668 if (ret) { 670 669 dev_err(component->dev, ··· 858 857 static int cs53l30_component_probe(struct snd_soc_component *component) 859 858 { 860 859 struct cs53l30_private *priv = snd_soc_component_get_drvdata(component); 861 - struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); 860 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); 862 861 863 862 if (priv->use_sdout2) 864 863 snd_soc_dapm_add_routes(dapm, cs53l30_dapm_routes_sdout2,