On Tue, Sep 25, 2012 at 10:12:44AM -0600, mathieu.poir...@linaro.org wrote:
> From: "Mathieu J. Poirier" <mathieu.poir...@linaro.org>
> 
> Making platform data declaration and handling similar accross all
> ab8500_xyc.c battery management files.  Also adding gards against
> NULL platform data.
> 
> Signed-off-by: Philippe Langlais <philippe.langl...@stericsson.com>
> Signed-off-by: Mathieu Poirier <mathieu.poir...@linaro.org>
> ---
>  drivers/power/ab8500_btemp.c    |   17 +++++++++--------
>  drivers/power/ab8500_charger.c  |   18 +++++++++---------
>  drivers/power/ab8500_fg.c       |   17 +++++++++--------
>  drivers/power/abx500_chargalg.c |   25 ++++++++++++++++++++-----
>  4 files changed, 47 insertions(+), 30 deletions(-)
> 
> diff --git a/drivers/power/ab8500_btemp.c b/drivers/power/ab8500_btemp.c
> index 1f33122..cf4b653 100644
> --- a/drivers/power/ab8500_btemp.c
> +++ b/drivers/power/ab8500_btemp.c
> @@ -1028,10 +1028,10 @@ static int __devinit ab8500_btemp_probe(struct 
> platform_device *pdev)
>  {
>       int irq, i, ret = 0;
>       u8 val;
> -     struct ab8500_platform_data *plat_data;
> -     struct ab8500_btemp *di;
> +     struct ab8500_platform_data *plat;
>  
> -     di = kzalloc(sizeof(*di), GFP_KERNEL);

While at it, you could remove the unneeded empty line.

> +     struct ab8500_btemp *di =
> +             kzalloc(sizeof(struct ab8500_btemp), GFP_KERNEL);

And here you need the empty line.

>       if (!di)
>               return -ENOMEM;
>  
--
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