]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mfd: tps6586x: Fix up define for TPS6586X_MAX_REGISTER
authorAxel Lin <axel.lin@ingics.com>
Tue, 7 Jul 2015 00:52:06 +0000 (08:52 +0800)
committerLee Jones <lee.jones@linaro.org>
Tue, 11 Aug 2015 14:08:43 +0000 (15:08 +0100)
The latest valid register is TPS6586X_VERSIONCRC.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/tps6586x.c

index e0a2583916ce2794c071e63851c9f82ca9afb032..ae08b290cecef7b36338d7f5312734288fb50c53 100644 (file)
@@ -52,7 +52,7 @@
 #define TPS6586X_VERSIONCRC    0xcd
 
 /* Maximum register */
-#define TPS6586X_MAX_REGISTER  (TPS6586X_VERSIONCRC + 1)
+#define TPS6586X_MAX_REGISTER  TPS6586X_VERSIONCRC
 
 struct tps6586x_irq_data {
        u8      mask_reg;
@@ -467,7 +467,7 @@ static bool is_volatile_reg(struct device *dev, unsigned int reg)
 static const struct regmap_config tps6586x_regmap_config = {
        .reg_bits = 8,
        .val_bits = 8,
-       .max_register = TPS6586X_MAX_REGISTER - 1,
+       .max_register = TPS6586X_MAX_REGISTER,
        .volatile_reg = is_volatile_reg,
        .cache_type = REGCACHE_RBTREE,
 };