Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266997
b: refs/heads/master
c: c571300
h: refs/heads/master
i:
  266995: 853d0a4
v: v3
  • Loading branch information
Lars-Peter Clausen authored and Mark Brown committed Sep 28, 2011
1 parent 6cb6f8b commit bbe7d6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 34 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: 954757d767a78bc4b863fa9ea703bd7f814c8a55
refs/heads/master: c5713004b304e89c8c5117d8f226d5a1603571dc
35 changes: 2 additions & 33 deletions trunk/drivers/base/regmap/regcache-rbtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,45 +46,14 @@ static unsigned int regcache_rbtree_get_register(
struct regcache_rbtree_node *rbnode, unsigned int idx,
unsigned int word_size)
{
unsigned int val;

switch (word_size) {
case 1: {
u8 *p = rbnode->block;
val = p[idx];
return val;
}
case 2: {
u16 *p = rbnode->block;
val = p[idx];
return val;
}
default:
BUG();
break;
}
return -1;
return regcache_get_val(rbnode->block, idx, word_size);
}

static void regcache_rbtree_set_register(struct regcache_rbtree_node *rbnode,
unsigned int idx, unsigned int val,
unsigned int word_size)
{
switch (word_size) {
case 1: {
u8 *p = rbnode->block;
p[idx] = val;
break;
}
case 2: {
u16 *p = rbnode->block;
p[idx] = val;
break;
}
default:
BUG();
break;
}
regcache_set_val(rbnode->block, idx, val, word_size);
}

static struct regcache_rbtree_node *regcache_rbtree_lookup(
Expand Down

0 comments on commit bbe7d6c

Please sign in to comment.