aboutsummaryrefslogtreecommitdiff
path: root/drivers/base/regmap/regmap-debugfs.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2013-01-02 15:32:00 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-01-08 20:52:45 +0000
commit120f80518125b8c312007a54106759d608487553 (patch)
tree8bfed65b46671eac0ec9e7ca04875eba7e4896e8 /drivers/base/regmap/regmap-debugfs.c
parentd1c3ed669a2d452cacfb48c2d171a1f364dae2ed (diff)
regmap: debugfs: Fix attempts to read nonexistant register blocks
Return the start of the last block we tried to read rather than a position, and also make sure we update the byte position while we're at it. Without this reads that go into nonexistant areas get confused. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/base/regmap/regmap-debugfs.c')
-rw-r--r--drivers/base/regmap/regmap-debugfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c
index 07aad786f817..43d51dc3d58b 100644
--- a/drivers/base/regmap/regmap-debugfs.c
+++ b/drivers/base/regmap/regmap-debugfs.c
@@ -108,7 +108,8 @@ static unsigned int regmap_debugfs_get_dump_start(struct regmap *map,
return c->base_reg;
}
- ret = c->max;
+ *pos = c->min;
+ ret = c->base_reg;
}
return ret;