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

Samuel Ortiz
2010-11-26T15:43:13Z

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@stericsson.com>
> Signed-off-by: Ludovic Barre <ludovic.barre@stericsson.com>
> ---
> 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