Skip to contentSkip to conversation

mfd: Correct WM831X_MAX_ISEL_VALUE

PATCH New Mark Brown 1 participant 1 message Nov 30, 2009

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 mfd: Correct WM831X_MAX_ISEL_VALUE

There was confusion between the array size and the highest ISEL value possible.

---
 drivers/mfd/wm831x-core.c            |    2 +-
 include/linux/mfd/wm831x/regulator.h |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/mfd/wm831x-core.c +1 -1
index d063e55..4b2021a 100644
@@ -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,
include/linux/mfd/wm831x/regulator.h +2 -2
index f954663..955d30f 100644
@@ -1212,7 +1212,7 @@
 #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
Signature · 1 line
1.6.5.3