Re: [PATCH 01/16] ASoC: soc-component: merge snd_soc_component_read() and snd_soc_component_read32()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello, 

On Tue, 16 Jun 2020, Kuninori Morimoto wrote:

> This patch do
> 	1) merge snd_soc_component_read() and snd_soc_component_read32()
> 	2) it uses soc_component_err() when error case (easy to notice)
> 	3) keeps read32 for now by #define
> 	4) update snd_soc_component_read() for all drivers

removing the possibility to return errors is a bit iffy, but reviewing
the existing usage, indeed in practise it is not much used.

And on the other side, having two component_read() variants with different 
style and overlapping usage, in soc-component.h, is very confusing, so 
this patch does clean up the component interface. So all in all, my 
++votes for the change.

I spotted one minor whitespace issue, but that's trivial, so for
the patch:
Reviewed-by: Kai Vehmanen <kai.vehmanen@xxxxxxxxxxxxxxx>

> --- a/sound/soc/soc-dapm.c
> +++ b/sound/soc/soc-dapm.c
> @@ -616,12 +616,11 @@ static const char *soc_dapm_prefix(struct snd_soc_dapm_context *dapm)
>  	return dapm->component->name_prefix;
>  }
>  
> -static int soc_dapm_read(struct snd_soc_dapm_context *dapm, int reg,
> -	unsigned int *value)
> +static unsigned int soc_dapm_read(struct snd_soc_dapm_context *dapm, int reg)
>  {
>  	if (!dapm->component)
>  		return -EIO;
> -	return snd_soc_component_read(dapm->component, reg, value);
> +	return  snd_soc_component_read(dapm->component, reg);

Trivial but you have extra whitespace there after return.

Br, Kai



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux