From: Liam Girdwood <lrg@slimlogic.co.uk>
To: Axel Lin <axel.lin@gmail.com>
Cc: linux-kernel@vger.kernel.org, Yong Shen <yong.shen@linaro.org>,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: Re: [PATCH] regulator: Move VCOINCELL to be the last element of mc13892_regulators array
Date: Mon, 09 May 2011 16:03:57 +0100 [thread overview]
Message-ID: <1304953437.3192.13.camel@odin> (raw)
In-Reply-To: <1304609578.5296.4.camel@phoenix>
On Thu, 2011-05-05 at 23:32 +0800, Axel Lin wrote:
> In include/linux/mfd/mc13892.h, we define MC13892_VCOINCELL as 23.
> Thus VCOINCELL should be defined as 23th element in mc13892_regulators array, not the first one.
> This actually fixes an off-by-one bug while accessing mc13892_regulators array.
>
> For example,
> In mc13892_regulator_probe, we use MC13892_VCAM as array index of mc13892_regulators array.
> mc13892_regulators[MC13892_VCAM].desc.ops->set_mode
> = mc13892_vcam_set_mode;
> Currently, it access mc13892_regulators[12] ,which is VAUDIO not VCAM.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
> I don't have this hardware handy, just found this bug while reading the code.
> I appreciate if someone can test it.
>
> Axel
Applied, Btw is this fix also for 2.6.39 ?
Thanks
Liam
next prev parent reply other threads:[~2011-05-09 15:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-05 15:32 [PATCH] regulator: Move VCOINCELL to be the last element of mc13892_regulators array Axel Lin
2011-05-06 9:38 ` Mark Brown
2011-05-09 15:03 ` Liam Girdwood [this message]
2011-05-10 8:54 ` Axel Lin
2011-05-10 9:37 ` Liam Girdwood
2011-05-10 11:00 ` Axel Lin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1304953437.3192.13.camel@odin \
--to=lrg@slimlogic.co.uk \
--cc=axel.lin@gmail.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=yong.shen@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox