diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-01-02 15:32:00 (GMT) |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-01-08 20:52:45 (GMT) |
commit | 120f80518125b8c312007a54106759d608487553 (patch) | |
tree | 8bfed65b46671eac0ec9e7ca04875eba7e4896e8 /drivers/base | |
parent | d1c3ed669a2d452cacfb48c2d171a1f364dae2ed (diff) | |
download | linux-120f80518125b8c312007a54106759d608487553.tar.xz |
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')
-rw-r--r-- | drivers/base/regmap/regmap-debugfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c index 07aad78..43d51dc 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; |