Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350369
b: refs/heads/master
c: cf57d60
h: refs/heads/master
i:
  350367: 02506fc
v: v3
  • Loading branch information
Dimitris Papastamos authored and Mark Brown committed Feb 11, 2013
1 parent 3e5348e commit df6b593
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c2c1ee66016a45477f58f0fd30907b1e959ca76b
refs/heads/master: cf57d6071f0610c99856c006ac06eb98a151f485
12 changes: 7 additions & 5 deletions trunk/drivers/base/regmap/regmap-debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,17 @@ static unsigned int regmap_debugfs_get_dump_start(struct regmap *map,
WARN_ON(list_empty(&map->debugfs_off_cache));
ret = base;

/* Find the relevant block */
/* Find the relevant block:offset */
list_for_each_entry(c, &map->debugfs_off_cache, list) {
if (from >= c->min && from <= c->max) {
*pos = c->min;
return c->base_reg;
fpos_offset = from - c->min;
reg_offset = fpos_offset / map->debugfs_tot_len;
*pos = c->min + (reg_offset * map->debugfs_tot_len);
return c->base_reg + reg_offset;
}

*pos = c->min;
ret = c->base_reg;
*pos = c->max;
ret = c->max_reg;
}

return ret;
Expand Down

0 comments on commit df6b593

Please sign in to comment.