diff mbox

[1/3] ASoC: wm0010: disable regulator on error

Message ID 1442572341-28201-1-git-send-email-sudipm.mukherjee@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sudip Mukherjee Sept. 18, 2015, 10:32 a.m. UTC
We have done regulator_bulk_enable() while booting the DSP but on the
error exit path we have not disbled it.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 sound/soc/codecs/wm0010.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Charles Keepax Sept. 18, 2015, 11:34 a.m. UTC | #1
On Fri, Sep 18, 2015 at 04:02:19PM +0530, Sudip Mukherjee wrote:
> We have done regulator_bulk_enable() while booting the DSP but on the
> error exit path we have not disbled it.
> 
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
>  sound/soc/codecs/wm0010.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/sound/soc/codecs/wm0010.c b/sound/soc/codecs/wm0010.c
> index 8434d45..79a7cd3 100644
> --- a/sound/soc/codecs/wm0010.c
> +++ b/sound/soc/codecs/wm0010.c
> @@ -739,8 +739,6 @@ static int wm0010_boot(struct snd_soc_codec *codec)
>  abort:
>  	/* Put the chip back into reset */
>  	wm0010_halt(codec);
> -	mutex_unlock(&wm0010->lock);
> -	return ret;

Does wm0010_halt not disable the regulators?

Thanks,
Charles

>  
>  err_core:
>  	mutex_unlock(&wm0010->lock);
> -- 
> 1.9.1
Charles Keepax Sept. 18, 2015, 12:38 p.m. UTC | #2
On Fri, Sep 18, 2015 at 06:12:05PM +0530, Sudip Mukherjee wrote:
> On Fri, Sep 18, 2015 at 12:34:12PM +0100, Charles Keepax wrote:
> > On Fri, Sep 18, 2015 at 04:02:19PM +0530, Sudip Mukherjee wrote:
> > > We have done regulator_bulk_enable() while booting the DSP but on the
> > > error exit path we have not disbled it.
> > > 
> > > Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> > > ---
> > >  sound/soc/codecs/wm0010.c | 2 --
> > >  1 file changed, 2 deletions(-)
> > > 
> > > diff --git a/sound/soc/codecs/wm0010.c b/sound/soc/codecs/wm0010.c
> > > index 8434d45..79a7cd3 100644
> > > --- a/sound/soc/codecs/wm0010.c
> > > +++ b/sound/soc/codecs/wm0010.c
> > > @@ -739,8 +739,6 @@ static int wm0010_boot(struct snd_soc_codec *codec)
> > >  abort:
> > >  	/* Put the chip back into reset */
> > >  	wm0010_halt(codec);
> > > -	mutex_unlock(&wm0010->lock);
> > > -	return ret;
> > 
> > Does wm0010_halt not disable the regulators?
> oops, yes, it does. Sorry I should have seen it before posting.
> patch 2/3 and 3/3 will still apply even if this 1/3 is not applied.
> Should I send a v2 leaving out this patch or is it ok to discard this
> patch while applying?

As long as they apply cleanly I would think its fine to just
leave them as is.

Thanks,
Charles
Sudip Mukherjee Sept. 18, 2015, 12:42 p.m. UTC | #3
On Fri, Sep 18, 2015 at 12:34:12PM +0100, Charles Keepax wrote:
> On Fri, Sep 18, 2015 at 04:02:19PM +0530, Sudip Mukherjee wrote:
> > We have done regulator_bulk_enable() while booting the DSP but on the
> > error exit path we have not disbled it.
> > 
> > Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> > ---
> >  sound/soc/codecs/wm0010.c | 2 --
> >  1 file changed, 2 deletions(-)
> > 
> > diff --git a/sound/soc/codecs/wm0010.c b/sound/soc/codecs/wm0010.c
> > index 8434d45..79a7cd3 100644
> > --- a/sound/soc/codecs/wm0010.c
> > +++ b/sound/soc/codecs/wm0010.c
> > @@ -739,8 +739,6 @@ static int wm0010_boot(struct snd_soc_codec *codec)
> >  abort:
> >  	/* Put the chip back into reset */
> >  	wm0010_halt(codec);
> > -	mutex_unlock(&wm0010->lock);
> > -	return ret;
> 
> Does wm0010_halt not disable the regulators?
oops, yes, it does. Sorry I should have seen it before posting.
patch 2/3 and 3/3 will still apply even if this 1/3 is not applied.
Should I send a v2 leaving out this patch or is it ok to discard this
patch while applying?

regards
sudip
diff mbox

Patch

diff --git a/sound/soc/codecs/wm0010.c b/sound/soc/codecs/wm0010.c
index 8434d45..79a7cd3 100644
--- a/sound/soc/codecs/wm0010.c
+++ b/sound/soc/codecs/wm0010.c
@@ -739,8 +739,6 @@  static int wm0010_boot(struct snd_soc_codec *codec)
 abort:
 	/* Put the chip back into reset */
 	wm0010_halt(codec);
-	mutex_unlock(&wm0010->lock);
-	return ret;
 
 err_core:
 	mutex_unlock(&wm0010->lock);