[alsa-devel] [PATCH 2/3] ASoC: uda1380: Fix missed uda1380_reset call if pdata->gpio_power is a valid gpio
Vasily
anarsoul at gmail.com
Sun Dec 4 19:55:19 CET 2011
2011/12/4 Axel Lin <axel.lin at gmail.com>:
> Current code does not call uda1380_reset() in uda1380_probe() if
> pdata->gpio_power is a valid gpio. Fix it.
>
> Also remove a redundant "Failed to issue reset" error message.
> We already show error message in uda1380_reset() error path.
>
> Signed-off-by: Axel Lin <axel.lin at gmail.com>
NAK. Issuing reset command when codec is powered off does not look as
a sane thing
to me.
> ---
> I don't has this hardware, I'd appreciate if someone can test this patch.
> Axel
> sound/soc/codecs/uda1380.c | 10 ++++------
> 1 files changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c
> index 3a238cb..7ebfbeb 100644
> --- a/sound/soc/codecs/uda1380.c
> +++ b/sound/soc/codecs/uda1380.c
> @@ -747,14 +747,12 @@ static int uda1380_probe(struct snd_soc_codec *codec)
> ret = gpio_direction_output(pdata->gpio_power, 0);
> if (ret)
> goto err_gpio_power_conf;
> - } else {
> - ret = uda1380_reset(codec);
> - if (ret) {
> - dev_err(codec->dev, "Failed to issue reset\n");
> - goto err_reset;
> - }
> }
>
> + ret = uda1380_reset(codec);
> + if (ret)
> + goto err_reset;
> +
> INIT_WORK(&uda1380->work, uda1380_flush_work);
>
> /* power on device */
> --
> 1.7.5.4
>
>
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
More information about the Alsa-devel
mailing list