[RESEND PATCH v1 3/6] staging: greybus: audio: Resolve compilation errors for GB codec module
Dan Carpenter
dan.carpenter at oracle.com
Tue Jun 2 14:29:40 CEST 2020
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 at gmail.com>
> ---
> 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
More information about the Alsa-devel
mailing list