Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267015
b: refs/heads/master
c: b03622a
h: refs/heads/master
i:
  267013: 145dc5f
  267011: 792c5b2
  267007: 0a25e4a
v: v3
  • Loading branch information
Mark Brown committed Oct 10, 2011
1 parent 8810ef9 commit eebdf46
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 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: e42c5a9a4230c38ceba0a890b30a2d0dd9314bff
refs/heads/master: b03622a80d2206c4179d6a41a0dc5cfbdfc853ee
11 changes: 5 additions & 6 deletions trunk/drivers/base/regmap/regcache-rbtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ static int regcache_rbtree_sync(struct regmap *map)
struct rb_node *node;
struct regcache_rbtree_node *rbnode;
unsigned int regtmp;
unsigned int val, def;
unsigned int val;
int ret;
int i;

Expand All @@ -315,13 +315,12 @@ static int regcache_rbtree_sync(struct regmap *map)
regtmp = rbnode->base_reg + i;
val = regcache_rbtree_get_register(rbnode, i,
map->cache_word_size);

/* Is this the hardware default? If so skip. */
ret = regcache_lookup_reg(map, i);
if (ret < 0)
def = 0;
else
def = map->reg_defaults[ret].def;
if (val == def)
if (ret > 0 && val == map->reg_defaults[ret].def)
continue;

map->cache_bypass = 1;
ret = _regmap_write(map, regtmp, val);
map->cache_bypass = 0;
Expand Down

0 comments on commit eebdf46

Please sign in to comment.