mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dylan Reid <dgreid@chromium.org>
To: linux-kernel@vger.kernel.org
Cc: broonie@kernel.org, Dylan Reid <dgreid@chromium.org>
Subject: [PATCH 1/2] regmap: cache: Step by stride in default sync.
Date: Tue, 18 Mar 2014 13:45:08 -0700	[thread overview]
Message-ID: <1395175509-19113-1-git-send-email-dgreid@chromium.org> (raw)

The default sync operation was still assuming a stride of one, fix it
to respect the reg_stride set in the map.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
---
 drivers/base/regmap/regcache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
index c6b1ac1..44af125 100644
--- a/drivers/base/regmap/regcache.c
+++ b/drivers/base/regmap/regcache.c
@@ -249,7 +249,7 @@ static int regcache_default_sync(struct regmap *map, unsigned int min,
 {
 	unsigned int reg;
 
-	for (reg = min; reg <= max; reg++) {
+	for (reg = min; reg <= max; reg += map->reg_stride) {
 		unsigned int val;
 		int ret;
 
-- 
1.8.1.3.605.g02339dd


             reply	other threads:[~2014-03-18 20:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-18 20:45 Dylan Reid [this message]
2014-03-18 20:45 ` [PATCH 2/2] regmap: cache: Don't attempt to sync non-writeable registers Dylan Reid
2014-03-19 10:39   ` Mark Brown
2014-03-19 10:39 ` [PATCH 1/2] regmap: cache: Step by stride in default sync Mark Brown

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=1395175509-19113-1-git-send-email-dgreid@chromium.org \
    --to=dgreid@chromium.org \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®