From: Kuninori Morimoto Date: Tue, 11 Nov 2025 00:23:40 +0000 (+0000) Subject: ASoC: codecs: max9867: convert to snd_soc_dapm_xxx() X-Git-Tag: v6.19-rc1~156^2~3^2~43^2~206 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46fb094b54c89ddf314f7e807e5457be9b185bbc;p=thirdparty%2Fkernel%2Flinux.git ASoC: codecs: max9867: 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 Reviewed-by: Charles Keepax Link: https://patch.msgid.link/87v7jh4dtf.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/max9867.c b/sound/soc/codecs/max9867.c index 35ec9c1b18f91..9cad9b698cf2f 100644 --- a/sound/soc/codecs/max9867.c +++ b/sound/soc/codecs/max9867.c @@ -556,14 +556,18 @@ static struct snd_soc_dai_driver max9867_dai[] = { #ifdef CONFIG_PM static int max9867_suspend(struct snd_soc_component *component) { - snd_soc_component_force_bias_level(component, SND_SOC_BIAS_OFF); + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); + + snd_soc_dapm_force_bias_level(dapm, SND_SOC_BIAS_OFF); return 0; } static int max9867_resume(struct snd_soc_component *component) { - snd_soc_component_force_bias_level(component, SND_SOC_BIAS_STANDBY); + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); + + snd_soc_dapm_force_bias_level(dapm, SND_SOC_BIAS_STANDBY); return 0; } @@ -577,6 +581,7 @@ static int max9867_set_bias_level(struct snd_soc_component *component, { int err; struct max9867_priv *max9867 = snd_soc_component_get_drvdata(component); + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); switch (level) { case SND_SOC_BIAS_ON: @@ -585,7 +590,7 @@ static int max9867_set_bias_level(struct snd_soc_component *component, return err; break; case SND_SOC_BIAS_STANDBY: - if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) { + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF) { err = regcache_sync(max9867->regmap); if (err) return err;