mfd: rk808: Fix RK818_IRQ_DISCHG_ILIM initializer
authorArnd Bergmann <arnd@arndb.de>
Tue, 6 Sep 2016 13:13:01 +0000 (15:13 +0200)
committerLee Jones <lee.jones@linaro.org>
Tue, 4 Oct 2016 14:48:05 +0000 (15:48 +0100)
When building with -Woverride-init, we get a warning about an incorrect
initializer:

drivers/mfd/rk808.c:244:8: error: initialized field overwritten [-Werror=override-init]
  [RK818_IRQ_DISCHG_ILIM] = {

This is clearly a mistake, as both RK818_IRQ_DISCHG_ILIM and RK818_IRQ_USB_OV
are defined as '7', but they refer to different register bits. Changing
RK818_IRQ_DISCHG_ILIM to 15 is consistent with how all other 14 interrupts are
handled here, so I'm assuming this is what it should have been.

Fixes: 2eedcbfc0612 ("mfd: rk808: Add RK818 support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
include/linux/mfd/rk808.h

index fc5db6fcb57d74d3b59c90903a447684491fc0c1..6d435a3c06bcc6f7804181966c5e7e4f9a119caf 100644 (file)
@@ -244,7 +244,7 @@ enum rk818_reg {
 #define RK818_IRQ_CHG_TS1      12
 #define RK818_IRQ_TS2          13
 #define RK818_IRQ_CHG_CVTLIM   14
-#define RK818_IRQ_DISCHG_ILIM  7
+#define RK818_IRQ_DISCHG_ILIM  15
 
 #define RK818_IRQ_VOUT_LO_MSK          BIT(0)
 #define RK818_IRQ_VB_LO_MSK            BIT(1)