aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/regmap/regmap-debugfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/regmap/regmap-debugfs.c')
-rw-r--r--drivers/base/regmap/regmap-debugfs.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c
index 0e94fd3c95a3..3fade1ceaf15 100644
--- a/drivers/base/regmap/regmap-debugfs.c
+++ b/drivers/base/regmap/regmap-debugfs.c
@@ -81,6 +81,8 @@ static unsigned int regmap_debugfs_get_dump_start(struct regmap *map,
81 struct regmap_debugfs_off_cache *c = NULL; 81 struct regmap_debugfs_off_cache *c = NULL;
82 loff_t p = 0; 82 loff_t p = 0;
83 unsigned int i, ret; 83 unsigned int i, ret;
84 unsigned int fpos_offset;
85 unsigned int reg_offset;
84 86
85 /* 87 /*
86 * If we don't have a cache build one so we don't have to do a 88 * If we don't have a cache build one so we don't have to do a
@@ -93,6 +95,9 @@ static unsigned int regmap_debugfs_get_dump_start(struct regmap *map,
93 regmap_precious(map, i)) { 95 regmap_precious(map, i)) {
94 if (c) { 96 if (c) {
95 c->max = p - 1; 97 c->max = p - 1;
98 fpos_offset = c->max - c->min;
99 reg_offset = fpos_offset / map->debugfs_tot_len;
100 c->max_reg = c->base_reg + reg_offset;
96 list_add_tail(&c->list, 101 list_add_tail(&c->list,
97 &map->debugfs_off_cache); 102 &map->debugfs_off_cache);
98 c = NULL; 103 c = NULL;
@@ -119,6 +124,9 @@ static unsigned int regmap_debugfs_get_dump_start(struct regmap *map,
119 /* Close the last entry off if we didn't scan beyond it */ 124 /* Close the last entry off if we didn't scan beyond it */
120 if (c) { 125 if (c) {
121 c->max = p - 1; 126 c->max = p - 1;
127 fpos_offset = c->max - c->min;
128 reg_offset = fpos_offset / map->debugfs_tot_len;
129 c->max_reg = c->base_reg + reg_offset;
122 list_add_tail(&c->list, 130 list_add_tail(&c->list,
123 &map->debugfs_off_cache); 131 &map->debugfs_off_cache);
124 } 132 }