lkml.org 
[lkml]   [2011]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] regulator: Move VCOINCELL to be the last element of mc13892_regulators array
From
Date
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



\
 
 \ /
  Last update: 2011-05-09 17:07    [W:0.110 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site