Re: [RESEND PATCH v1 3/6] staging: greybus: audio: Resolve compilation errors for GB codec module

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

 



On Tue, Jun 02, 2020 at 10:51:12AM +0530, Vaibhav Agarwal wrote:
> Due to dependencies on ASoC framework changes, GB dummy codec module
> compilation is currently disabled. This patch updates codec driver as
> per the latest ASoC APIs.
> 
> Signed-off-by: Vaibhav Agarwal <vaibhav.sr@xxxxxxxxx>
> ---
>  drivers/staging/greybus/audio_codec.c | 87 +++++++++++++--------------
>  drivers/staging/greybus/audio_codec.h |  2 +-
>  2 files changed, 44 insertions(+), 45 deletions(-)
> 
> diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c
> index a2ee587e5a79..bbd072acda5c 100644
> --- a/drivers/staging/greybus/audio_codec.c
> +++ b/drivers/staging/greybus/audio_codec.c
> @@ -832,7 +832,7 @@ static int gbaudio_init_jack(struct gbaudio_module_info *module,
>  int gbaudio_register_module(struct gbaudio_module_info *module)
>  {
>  	int ret;
> -	struct snd_soc_codec *codec;
> +	struct snd_soc_component *component;

I quite like the "component" pointer because it's assigned once at the
start of the function and used consistently throughout.  The other
pointers I complained about were just temporary pointers which meant
different things depending on which line you were on.  They made the
code harder to read.

My only quible is that in the next patch it's called "comp" and here
it's called "component".  Let's just use "comp" for all the local
variables.


regards,
dan carpenter



[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