mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1] regmap: debugfs: Fix return from regmap_debugfs_get_dump_start
@ 2013-05-14  6:54 Srinivas KANDAGATLA
  2013-05-14 12:53 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Srinivas KANDAGATLA @ 2013-05-14  6:54 UTC (permalink / raw)
  To: broonie; +Cc: srinivas.kandagatla, gregkh, linux-kernel

From: Srinivas Kandagatla <srinivas.kandagatla@st.com>

regmap_debugfs_get_dump_start should return the offset of the register
it should start reading from, However in the current code at one point
the code does not return correct register offset.

With this patch all the returns from this function takes reg_stride in
to consideration to return correct offset.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
---
 drivers/base/regmap/regmap-debugfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c
index 23b701f..2ec4dad 100644
--- a/drivers/base/regmap/regmap-debugfs.c
+++ b/drivers/base/regmap/regmap-debugfs.c
@@ -145,7 +145,7 @@ static unsigned int regmap_debugfs_get_dump_start(struct regmap *map,
 			reg_offset = fpos_offset / map->debugfs_tot_len;
 			*pos = c->min + (reg_offset * map->debugfs_tot_len);
 			mutex_unlock(&map->cache_lock);
-			return c->base_reg + reg_offset;
+			return c->base_reg + (reg_offset * map->reg_stride);
 		}
 
 		*pos = c->max;
-- 
1.7.6.5


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-05-14 12:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-14  6:54 [PATCH v1] regmap: debugfs: Fix return from regmap_debugfs_get_dump_start Srinivas KANDAGATLA
2013-05-14 12:53 ` Mark Brown

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®