diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-04-16 16:02:41 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-04-16 16:02:41 +0100 |
commit | 60f7110e36ff7858182e8990a2d19fa3df7e05f5 (patch) | |
tree | 179c2a9f8fe654694d40536a506345db80705436 /drivers/base/regmap | |
parent | 9659293c1784f3d9df2235f6ebf92f6f9059a563 (diff) | |
parent | 41ef2d5678d83af030125550329b6ae8b74618fa (diff) |
Merge tag 'v3.9-rc7' into regmap-cache
Linux 3.9-rc7
Diffstat (limited to 'drivers/base/regmap')
-rw-r--r-- | drivers/base/regmap/regcache-rbtree.c | 2 | ||||
-rw-r--r-- | drivers/base/regmap/regmap-irq.c | 1 | ||||
-rw-r--r-- | drivers/base/regmap/regmap.c | 6 |
3 files changed, 6 insertions, 3 deletions
diff --git a/drivers/base/regmap/regcache-rbtree.c b/drivers/base/regmap/regcache-rbtree.c index 1fdd8ec6af23..aa0875f6f1b7 100644 --- a/drivers/base/regmap/regcache-rbtree.c +++ b/drivers/base/regmap/regcache-rbtree.c @@ -404,7 +404,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; diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c index 4706c63d0bc6..020ea2b9fd2f 100644 --- a/drivers/base/regmap/regmap-irq.c +++ b/drivers/base/regmap/regmap-irq.c @@ -184,6 +184,7 @@ static irqreturn_t regmap_irq_thread(int irq, void *d) if (ret < 0) { dev_err(map->dev, "IRQ thread failed to resume: %d\n", ret); + pm_runtime_put(map->dev); return IRQ_NONE; } } diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 9ab1e1fedbc9..940fc63ed5f2 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -730,12 +730,12 @@ skip_format_initialization: } } + regmap_debugfs_init(map, config->name); + ret = regcache_init(map, config); if (ret != 0) goto err_range; - regmap_debugfs_init(map, config->name); - /* Add a devres resource for dev_get_regmap() */ m = devres_alloc(dev_get_regmap_release, sizeof(*m), GFP_KERNEL); if (!m) { @@ -1056,6 +1056,8 @@ int _regmap_raw_write(struct regmap *map, unsigned int reg, kfree(async->work_buf); kfree(async); } + + return ret; } trace_regmap_hw_write_start(map->dev, reg, |