From: Mark Brown Date: Thu, 10 Oct 2013 19:55:03 +0000 (+0100) Subject: regmap: Use async I/O for patch application X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1a25f26138cde2b83fd74ead6da0bbd4b6c42b60;p=linux-beck.git 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 --- 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, bypass = map->cache_bypass; map->cache_bypass = true; + map->async = true; /* Write out first; it's useful to apply even if we fail later. */ for (i = 0; i < num_regs; i++) { @@ -2052,10 +2053,13 @@ int regmap_register_patch(struct regmap *map, const struct reg_default *regs, } out: + map->async = false; map->cache_bypass = bypass; map->unlock(map->lock_arg); + regmap_async_complete(map); + return ret; } EXPORT_SYMBOL_GPL(regmap_register_patch);