Re: [PATCH 47/57] power: Harmonising platform datadeclaration/handling

From: Anton Vorontsov
Date: Thu Sep 27 2012 - 21:14:29 EST


On Tue, Sep 25, 2012 at 10:12:44AM -0600, mathieu.poirier@xxxxxxxxxx wrote:
> From: "Mathieu J. Poirier" <mathieu.poirier@xxxxxxxxxx>
>
> 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.langlais@xxxxxxxxxxxxxx>
> Signed-off-by: Mathieu Poirier <mathieu.poirier@xxxxxxxxxx>
> ---
> 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/