Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294181
b: refs/heads/master
c: df00c79
h: refs/heads/master
i:
  294179: 99c6552
v: v3
  • Loading branch information
Laxman Dewangan authored and Mark Brown committed Feb 17, 2012
1 parent 9aadd86 commit c9dcc20
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8eaeb21925563075ae036c2e5ba8d041b70e18fa
refs/heads/master: df00c79f78d8b0ad788daf689ea461ace9d0811f
5 changes: 5 additions & 0 deletions trunk/drivers/base/regmap/regcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,17 @@ static int regcache_hw_init(struct regmap *map)
return -EINVAL;

if (!map->reg_defaults_raw) {
u32 cache_bypass = map->cache_bypass;
dev_warn(map->dev, "No cache defaults, reading back from HW\n");

/* Bypass the cache access till data read from HW*/
map->cache_bypass = 1;
tmp_buf = kmalloc(map->cache_size_raw, GFP_KERNEL);
if (!tmp_buf)
return -EINVAL;
ret = regmap_bulk_read(map, 0, tmp_buf,
map->num_reg_defaults_raw);
map->cache_bypass = cache_bypass;
if (ret < 0) {
kfree(tmp_buf);
return ret;
Expand Down

0 comments on commit c9dcc20

Please sign in to comment.