aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-10-10 15:55:03 -0400
committerMark Brown <broonie@linaro.org>2013-10-10 16:15:21 -0400
commit1a25f26138cde2b83fd74ead6da0bbd4b6c42b60 (patch)
tree9bd9b387503f46ae504eaf0b2d8a05bbfb016aad /drivers/base
parent915f441b6f31b1a8ee01e9263a4e2d44c434d832 (diff)
regmap: Use async I/O for patch application
Try to speed up patch application a little using async I/O. Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/regmap/regmap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 0503d868ff8c..71282e12fd29 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -2029,6 +2029,7 @@ int regmap_register_patch(struct regmap *map, const struct reg_default *regs,
2029 bypass = map->cache_bypass; 2029 bypass = map->cache_bypass;
2030 2030
2031 map->cache_bypass = true; 2031 map->cache_bypass = true;
2032 map->async = true;
2032 2033
2033 /* Write out first; it's useful to apply even if we fail later. */ 2034 /* Write out first; it's useful to apply even if we fail later. */
2034 for (i = 0; i < num_regs; i++) { 2035 for (i = 0; i < num_regs; i++) {
@@ -2052,10 +2053,13 @@ int regmap_register_patch(struct regmap *map, const struct reg_default *regs,
2052 } 2053 }
2053 2054
2054out: 2055out:
2056 map->async = false;
2055 map->cache_bypass = bypass; 2057 map->cache_bypass = bypass;
2056 2058
2057 map->unlock(map->lock_arg); 2059 map->unlock(map->lock_arg);
2058 2060
2061 regmap_async_complete(map);
2062
2059 return ret; 2063 return ret;
2060} 2064}
2061EXPORT_SYMBOL_GPL(regmap_register_patch); 2065EXPORT_SYMBOL_GPL(regmap_register_patch);