From cf3937987c18980c3dffc456c91fc1f7b1cec4ca Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 11 Nov 2025 00:25:36 +0000 Subject: [PATCH] ASoC: codecs: rt5682: 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/87ms4t2z5r.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- sound/soc/codecs/rt5682.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c index a0abd2ce0c1e1..d39f8e4f3474c 100644 --- a/sound/soc/codecs/rt5682.c +++ b/sound/soc/codecs/rt5682.c @@ -928,7 +928,7 @@ static void rt5682_enable_push_button_irq(struct snd_soc_component *component, static int rt5682_headset_detect(struct snd_soc_component *component, int jack_insert) { struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component); - struct snd_soc_dapm_context *dapm = &component->dapm; + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); unsigned int val, count; if (jack_insert) { @@ -1115,7 +1115,7 @@ void rt5682_jack_detect_handler(struct work_struct *work) } } - dapm = snd_soc_component_get_dapm(rt5682->component); + dapm = snd_soc_component_to_dapm(rt5682->component); snd_soc_dapm_mutex_lock(dapm); mutex_lock(&rt5682->calibrate_mutex); @@ -2595,7 +2595,7 @@ static int rt5682_wclk_prepare(struct clk_hw *hw) return -EINVAL; component = rt5682->component; - dapm = snd_soc_component_get_dapm(component); + dapm = snd_soc_component_to_dapm(component); snd_soc_dapm_mutex_lock(dapm); @@ -2633,7 +2633,7 @@ static void rt5682_wclk_unprepare(struct clk_hw *hw) return; component = rt5682->component; - dapm = snd_soc_component_get_dapm(component); + dapm = snd_soc_component_to_dapm(component); snd_soc_dapm_mutex_lock(dapm); @@ -2928,9 +2928,9 @@ EXPORT_SYMBOL_GPL(rt5682_register_dai_clks); static int rt5682_probe(struct snd_soc_component *component) { struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component); + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); struct sdw_slave *slave; unsigned long time; - struct snd_soc_dapm_context *dapm = &component->dapm; rt5682->component = component; -- 2.47.3