diff mbox series

[4/7] ASoC: intel: use snd_soc_dapm_to_component()

Message ID 87jz7u9h4c.wl-kuninori.morimoto.gx@renesas.com (mailing list archive)
State New
Headers show
Series ASoC: use snd_soc_dapm_to_component() | expand

Commit Message

Kuninori Morimoto April 9, 2025, 2:57 a.m. UTC
We can use snd_soc_dapm_to_component(). Let's use it

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/intel/avs/control.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Cezary Rojewski April 9, 2025, 8:03 a.m. UTC | #1
On 2025-04-09 4:57 AM, Kuninori Morimoto wrote:
> We can use snd_soc_dapm_to_component(). Let's use it
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

I'd appreciate "ASoC: Intel: avs:" prefix in the title. Keeps it 
coherent with other avs-driver changes.

> ---
>   sound/soc/intel/avs/control.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/intel/avs/control.c b/sound/soc/intel/avs/control.c
> index 2e01dc75a15a..1af270ef0c8b 100644
> --- a/sound/soc/intel/avs/control.c
> +++ b/sound/soc/intel/avs/control.c
> @@ -19,7 +19,7 @@ static struct avs_dev *avs_get_kcontrol_adev(struct snd_kcontrol *kcontrol)
>   
>   	w = snd_soc_dapm_kcontrol_widget(kcontrol);
>   
> -	return to_avs_dev(w->dapm->component->dev);
> +	return to_avs_dev(snd_soc_dapm_to_component(w->dapm)->dev);
>   }
>   
>   static struct avs_path_module *avs_get_volume_module(struct avs_dev *adev, u32 id)
Kuninori Morimoto April 10, 2025, 12:20 a.m. UTC | #2
Hi Cezary

> > We can use snd_soc_dapm_to_component(). Let's use it
> > 
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> I'd appreciate "ASoC: Intel: avs:" prefix in the title. Keeps it 
> coherent with other avs-driver changes.

OK, thanks.
Will do in v2

Thank you for your help !!

Best regards
---
Kuninori Morimoto
diff mbox series

Patch

diff --git a/sound/soc/intel/avs/control.c b/sound/soc/intel/avs/control.c
index 2e01dc75a15a..1af270ef0c8b 100644
--- a/sound/soc/intel/avs/control.c
+++ b/sound/soc/intel/avs/control.c
@@ -19,7 +19,7 @@  static struct avs_dev *avs_get_kcontrol_adev(struct snd_kcontrol *kcontrol)
 
 	w = snd_soc_dapm_kcontrol_widget(kcontrol);
 
-	return to_avs_dev(w->dapm->component->dev);
+	return to_avs_dev(snd_soc_dapm_to_component(w->dapm)->dev);
 }
 
 static struct avs_path_module *avs_get_volume_module(struct avs_dev *adev, u32 id)