Re: [PATCH 53/57] power: ab8500_fg: Moving structure definitions toheader file

From: Anton Vorontsov
Date: Thu Sep 27 2012 - 22:54:33 EST


On Tue, Sep 25, 2012 at 10:12:50AM -0600, mathieu.poirier@xxxxxxxxxx wrote:
> From: "Mathieu J. Poirier" <mathieu.poirier@xxxxxxxxxx>
>
> Signed-off-by: Mathieu Poirier <mathieu.poirier@xxxxxxxxxx>
> ---
[...]
> diff --git a/drivers/power/ab8500_fg.h b/drivers/power/ab8500_fg.h
> new file mode 100644
> index 0000000..5cfadc2
> --- /dev/null
> +++ b/drivers/power/ab8500_fg.h
> @@ -0,0 +1,201 @@
> +/*
> + * Copyright (C) ST-Ericsson AB 2012
> + *
> + * Main and Back-up battery management driver.
> + *
> + * Note: Backup battery management is required in case of Li-Ion battery and not
> + * for capacitive battery. HREF boards have capacitive battery and hence backup
> + * battery management is not used and the supported code is available in this
> + * driver.
> + *
> + * License Terms: GNU General Public License v2
> + * Author: Johan Palsson <johan.palsson@xxxxxxxxxxxxxx>
> + * Author: Karl Komierowski <karl.komierowski@xxxxxxxxxxxxxx>
> + */
> +

The change is dubious, since you don't seem to use the header anywhere
outside of _fg, so technically there's no need for it.

But if you want to logically separate structs and definitions, it's fine.

OK, but at least you have to check for multiple inclusions, I guess.
I.e. #ifndef __AB8500_FG_H...

> +#define MILLI_TO_MICRO 1000
> +#define FG_LSB_IN_MA 1627
> +#define QLSB_NANO_AMP_HOURS_X10 1129
> +#define INS_CURR_TIMEOUT (3 * HZ)
--
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/