mfd: Correct WM831X_MAX_ISEL_VALUE
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 30 Nov 2009 13:24:18 +0000 (13:24 +0000)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 1 Dec 2009 10:24:19 +0000 (11:24 +0100)
There was confusion between the array size and the highest ISEL
value possible.

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/wm831x-core.c
include/linux/mfd/wm831x/regulator.h

index 49b7885c2702ce5ae286b8e267ff75f4ac698c6a..7f27576ca0464bede0c3bb6e1a1f86d04630f5eb 100644 (file)
@@ -29,7 +29,7 @@
 /* Current settings - values are 2*2^(reg_val/4) microamps.  These are
  * exported since they are used by multiple drivers.
  */
-int wm831x_isinkv_values[WM831X_ISINK_MAX_ISEL] = {
+int wm831x_isinkv_values[WM831X_ISINK_MAX_ISEL + 1] = {
        2,
        2,
        3,
index f95466343fb2dd77fc7fe4bce8ea417ccb113703..955d30fc6a274aef932ac8c619e672453508b229 100644 (file)
 #define WM831X_LDO1_OK_SHIFT                         0  /* LDO1_OK */
 #define WM831X_LDO1_OK_WIDTH                         1  /* LDO1_OK */
 
-#define WM831X_ISINK_MAX_ISEL 56
-extern int wm831x_isinkv_values[WM831X_ISINK_MAX_ISEL];
+#define WM831X_ISINK_MAX_ISEL 55
+extern int wm831x_isinkv_values[WM831X_ISINK_MAX_ISEL + 1];
 
 #endif