mirror of https://gitee.com/openkylin/linux.git
Merge remote-tracking branch 'regmap/fix/cache' into tmp
This commit is contained in:
commit
7ff2b19359
|
@ -398,7 +398,7 @@ static int regcache_rbtree_sync(struct regmap *map, unsigned int min,
|
|||
base = 0;
|
||||
|
||||
if (max < rbnode->base_reg + rbnode->blklen)
|
||||
end = rbnode->base_reg + rbnode->blklen - max;
|
||||
end = max - rbnode->base_reg + 1;
|
||||
else
|
||||
end = rbnode->blklen;
|
||||
|
||||
|
|
|
@ -943,8 +943,7 @@ static int _regmap_raw_write(struct regmap *map, unsigned int reg,
|
|||
unsigned int ival;
|
||||
int val_bytes = map->format.val_bytes;
|
||||
for (i = 0; i < val_len / val_bytes; i++) {
|
||||
memcpy(map->work_buf, val + (i * val_bytes), val_bytes);
|
||||
ival = map->format.parse_val(map->work_buf);
|
||||
ival = map->format.parse_val(val + (i * val_bytes));
|
||||
ret = regcache_write(map, reg + (i * map->reg_stride),
|
||||
ival);
|
||||
if (ret) {
|
||||
|
|
Loading…
Reference in New Issue