On Sat, Apr 21, 2012 at 04:28:27PM +0100, Stefan Schmidt wrote:
> Hello.
> 
> On Sat, 2012-04-21 at 11:05, benjamin deering wrote:
> > Protect calls in bq27x00_external_power_changed with the mutex that
> > is used to protect the same calls in other places in the driver.
> > ---
> >  drivers/power/bq27x00_battery.c |    2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> > 
> > diff --git a/drivers/power/bq27x00_battery.c 
> > b/drivers/power/bq27x00_battery.c
> > index 59e68db..346b489 100644
> > --- a/drivers/power/bq27x00_battery.c
> > +++ b/drivers/power/bq27x00_battery.c
> > @@ -513,8 +513,10 @@ static void bq27x00_external_power_changed(struct 
> > power_supply *psy)
> >  {
> >     struct bq27x00_device_info *di = to_bq27x00_device_info(psy);
> >  
> > +   mutex_lock(&di->lock);
> >     cancel_delayed_work_sync(&di->work);
> >     schedule_delayed_work(&di->work, 0);
> > +   mutex_unlock(&di->lock);
> >  }
> >  
> >  static int bq27x00_powersupply_init(struct bq27x00_device_info *di)
> 
> This one looks better. :)
> 
> Reviewed-by: Stefan Schmidt <ste...@datenfreihafen.org>

can you test it with shr-core?

last 2 patches (now)
http://git.shr-project.org/git/?p=meta-smartphone.git;a=shortlog;h=refs/heads/jansa/test

on my FR I'm usually using 3.2, but if you can confirm it works, I'll
push it to shr branch and also to shr-3.2-nodrm.

Cheers,

-- 
Martin 'JaMa' Jansa     jabber: martin.ja...@gmail.com

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Shr-devel mailing list
Shr-devel@lists.shr-project.org
http://lists.shr-project.org/mailman/listinfo/shr-devel

Reply via email to