[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130802020633.GA20542@Robin-OptiPlex-780>
Date: Fri, 2 Aug 2013 10:06:34 +0800
From: Robin Gong <b38343@...escale.com>
To: Axel Lin <axel.lin@...ics.com>
CC: Mark Brown <broonie@...nel.org>,
Liam Girdwood <lgirdwood@...il.com>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] regulator: pfuze100: Fix off-by-one for max_register
setting
On Thu, Aug 01, 2013 at 07:59:56PM +0800, Axel Lin wrote:
> max_register should be register count - 1.
>
> Signed-off-by: Axel Lin <axel.lin@...ics.com>
> ---
> Hi Robin,
> I don't have the datasheet, can you check if this patch is correct or not?
> If PFUZE_NUMREGS really means register count, I think this fix is required.
>
Yes, you are right.
Reviewed-by: Robin Gong <b38343@...escale.com>
Thanks.
> Thanks,
> Axel
> drivers/regulator/pfuze100-regulator.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c
> index bda5561..ba67b2c 100644
> --- a/drivers/regulator/pfuze100-regulator.c
> +++ b/drivers/regulator/pfuze100-regulator.c
> @@ -332,7 +332,7 @@ static int pfuze_identify(struct pfuze_chip *pfuze_chip)
> static const struct regmap_config pfuze_regmap_config = {
> .reg_bits = 8,
> .val_bits = 8,
> - .max_register = PFUZE_NUMREGS,
> + .max_register = PFUZE_NUMREGS - 1,
> .cache_type = REGCACHE_RBTREE,
> };
>
> --
> 1.8.1.2
>
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists