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 <[email protected]>
regards
Stefan Schmidt
_______________________________________________
Shr-devel mailing list
[email protected]
http://lists.shr-project.org/mailman/listinfo/shr-devel