Skip to content

Commit

Permalink
Merge remote-tracking branches 'regmap/fix/irq', 'regmap/fix/rbtree' …
Browse files Browse the repository at this point in the history
…and 'regmap/fix/sync' into regmap-linus
  • Loading branch information
Mark Brown committed Mar 7, 2015
4 parents 13a7a6a + 09cadf6 + 328f494 + 4ceba98 commit 7d720ee
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion drivers/base/regmap/regcache-rbtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ static int regcache_rbtree_insert_to_block(struct regmap *map,
if (pos == 0) {
memmove(blk + offset * map->cache_word_size,
blk, rbnode->blklen * map->cache_word_size);
bitmap_shift_right(present, present, offset, blklen);
bitmap_shift_left(present, present, offset, blklen);
}

/* update the rbnode block, its size and the base register */
Expand Down
6 changes: 4 additions & 2 deletions drivers/base/regmap/regcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,8 @@ static int regcache_sync_block_single(struct regmap *map, void *block,
for (i = start; i < end; i++) {
regtmp = block_base + (i * map->reg_stride);

if (!regcache_reg_present(cache_present, i))
if (!regcache_reg_present(cache_present, i) ||
!regmap_writeable(map, regtmp))
continue;

val = regcache_get_val(map, block, i);
Expand Down Expand Up @@ -677,7 +678,8 @@ static int regcache_sync_block_raw(struct regmap *map, void *block,
for (i = start; i < end; i++) {
regtmp = block_base + (i * map->reg_stride);

if (!regcache_reg_present(cache_present, i)) {
if (!regcache_reg_present(cache_present, i) ||
!regmap_writeable(map, regtmp)) {
ret = regcache_sync_block_raw_flush(map, &data,
base, regtmp);
if (ret != 0)
Expand Down
3 changes: 2 additions & 1 deletion drivers/base/regmap/regmap-irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,8 @@ int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags,
goto err_alloc;
}

ret = request_threaded_irq(irq, NULL, regmap_irq_thread, irq_flags,
ret = request_threaded_irq(irq, NULL, regmap_irq_thread,
irq_flags | IRQF_ONESHOT,
chip->name, d);
if (ret != 0) {
dev_err(map->dev, "Failed to request IRQ %d for %s: %d\n",
Expand Down

0 comments on commit 7d720ee

Please sign in to comment.