All of lore.kernel.org
 help / color / mirror / Atom feed
From: Axel Lin <axel.lin@ingics.com>
To: Lee Jones <lee.jones@linaro.org>
Cc: Mike Rapoport <mike@compulab.co.il>,
	Alban Bedel <alban.bedel@avionic-design.de>,
	Stefan Agner <stefan@agner.ch>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] mfd: tps6586x: Fix up define for TPS6586X_MAX_REGISTER
Date: Tue, 07 Jul 2015 08:52:06 +0800	[thread overview]
Message-ID: <1436230326.10336.0.camel@ingics.com> (raw)

The latest valid register is TPS6586X_VERSIONCRC.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/mfd/tps6586x.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/tps6586x.c b/drivers/mfd/tps6586x.c
index e0a2583..ae08b29 100644
--- a/drivers/mfd/tps6586x.c
+++ b/drivers/mfd/tps6586x.c
@@ -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,
 };
-- 
2.1.0




             reply	other threads:[~2015-07-07  0:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-07  0:52 Axel Lin [this message]
2015-07-07  6:47 ` [PATCH] mfd: tps6586x: Fix up define for TPS6586X_MAX_REGISTER Lee Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1436230326.10336.0.camel@ingics.com \
    --to=axel.lin@ingics.com \
    --cc=alban.bedel@avionic-design.de \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike@compulab.co.il \
    --cc=stefan@agner.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.