From: Axel Lin Date: Thu, 5 May 2011 15:32:58 +0000 (+0800) Subject: regulator: Move VCOINCELL to be the last element of mc13892_regulators array X-Git-Tag: v3.0-rc1~48^2~31 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba413c5972676295862797a46f9070f81691d80e;p=pandora-kernel.git regulator: Move VCOINCELL to be the last element of mc13892_regulators array 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 Acked-by: Mark Brown Signed-off-by: Liam Girdwood --- Reading git-diff-tree failed