From: Mark Brown Date: Wed, 2 Jan 2013 15:32:00 +0000 (+0000) Subject: regmap: debugfs: Fix attempts to read nonexistant register blocks X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=120f80518125b8c312007a54106759d608487553;p=linux-beck.git 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 --- 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;