On Tue, Sep 25, 2012 at 10:12:28AM -0600, mathieu.poir...@linaro.org wrote:
> From: Rajkumar Kasirajan <rajkumar.kasira...@stericsson.com>
> 
> If battery is not identified while fg probe, mah_max_design gets
> initialized with unknown battery's charge full design. Reinitialize
> mah_max_design if battery is identified after fg probe.
> 
> Signed-off-by: Rajkumar Kasirajan <rajkumar.kasira...@stericsson.com>
> Signed-off-by: Mathieu Poirier <mathieu.poir...@linaro.org>
> Reviewed-by: Jonas ABERG <jonas.ab...@stericsson.com>
> Reviewed-by: Vijaya Kumar K-1 <vijay.kil...@stericsson.com>
> Reviewed-by: Marcus COOPER <marcus.xm.coo...@stericsson.com>
> Reviewed-by: Olivier CLERGEAUD <olivier.clerge...@stericsson.com>
> Reviewed-by: Arun MURTHY <arun.mur...@stericsson.com>
> Reviewed-by: Rupesh KUMAR <rupesh.ku...@stericsson.com>
> Reviewed-by: Rabin VINCENT <rabin.vinc...@stericsson.com>
> ---
>  drivers/power/ab8500_fg.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/power/ab8500_fg.c b/drivers/power/ab8500_fg.c
> index 0e71e7e..5e4a46b 100644
> --- a/drivers/power/ab8500_fg.c
> +++ b/drivers/power/ab8500_fg.c
> @@ -2258,9 +2258,9 @@ static int ab8500_fg_get_ext_psy_data(struct device 
> *dev, void *data)
>               case POWER_SUPPLY_PROP_TECHNOLOGY:
>                       switch (ext->type) {
>                       case POWER_SUPPLY_TYPE_BATTERY:
> -                             if (!di->flags.batt_id_received) {
> +                             if (!di->flags.batt_id_received &&
> +                                     di->bat->batt_id != BATTERY_UNKNOWN) {

Wrong indentation...

Yes, it will no longer fit into 80 columns, which probably means that the
code gone out of control, and need some refactorings before adding new
stuff.

>                                       const struct abx500_battery_type *b;
> -
>                                       b = 
> &(di->bat->bat_type[di->bat->batt_id]);
>  
>                                       di->flags.batt_id_received = true;
> -- 
> 1.7.5.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to