Re: [PATCH] MFD: ab8500 chip id exported to sysfs

From: Samuel Ortiz
Date: Fri Nov 26 2010 - 10:43:16 EST


Hi Mattias,

On Fri, Nov 26, 2010 at 01:05:25PM +0100, Mattias Wallin wrote:
> This patch adds a file into sysfs for reading out chip id.
> It have been requested for modem silent reboot.
>
> Change-Id: I8e2c10e740a90ab210e023df4214b422c01f2efb
I suppose this is some internal ID ? Please remove it from the Changelog.


> Signed-off-by: Mattias Wallin <mattias.wallin@xxxxxxxxxxxxxx>
> Signed-off-by: Ludovic Barre <ludovic.barre@xxxxxxxxxxxxxx>
> ---
> drivers/mfd/ab8500-core.c | 27 ++++++++++++++++++++++++++-
> 1 files changed, 26 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
> index e64569e..c59e832 100644
> --- a/drivers/mfd/ab8500-core.c
> +++ b/drivers/mfd/ab8500-core.c
> @@ -98,7 +98,7 @@ static int ab8500_get_chip_id(struct device *dev)
> if (!dev)
> return -EINVAL;
> ab8500 = dev_get_drvdata(dev->parent);
> - return (int)ab8500->chip_id;
> + return ab8500 ? (int)ab8500->chip_id : -EINVAL;
Here again, you're squeezing some potential bug fix into this patch.

The rest looks just fine.

Cheers,
Samuel.

--
Intel Open Source Technology Centre
http://oss.intel.com/
--
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/