mfd: tps6586x: Fix up define for TPS6586X_MAX_REGISTER

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>
This commit is contained in:
Axel Lin 2015-07-07 08:52:06 +08:00 committed by Lee Jones
parent 6887b042c5
commit 088d862c53
1 changed files with 2 additions and 2 deletions

View File

@ -52,7 +52,7 @@
#define TPS6586X_VERSIONCRC 0xcd #define TPS6586X_VERSIONCRC 0xcd
/* Maximum register */ /* Maximum register */
#define TPS6586X_MAX_REGISTER (TPS6586X_VERSIONCRC + 1) #define TPS6586X_MAX_REGISTER TPS6586X_VERSIONCRC
struct tps6586x_irq_data { struct tps6586x_irq_data {
u8 mask_reg; 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 = { static const struct regmap_config tps6586x_regmap_config = {
.reg_bits = 8, .reg_bits = 8,
.val_bits = 8, .val_bits = 8,
.max_register = TPS6586X_MAX_REGISTER - 1, .max_register = TPS6586X_MAX_REGISTER,
.volatile_reg = is_volatile_reg, .volatile_reg = is_volatile_reg,
.cache_type = REGCACHE_RBTREE, .cache_type = REGCACHE_RBTREE,
}; };