]> git.karo-electronics.de Git - linux-beck.git/commitdiff
regmap: Use async I/O for patch application
authorMark Brown <broonie@linaro.org>
Thu, 10 Oct 2013 19:55:03 +0000 (20:55 +0100)
committerMark Brown <broonie@linaro.org>
Thu, 10 Oct 2013 20:15:21 +0000 (21:15 +0100)
Try to speed up patch application a little using async I/O.

Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/base/regmap/regmap.c

index 0503d868ff8c190b3fe5399b35cbd56505431e89..71282e12fd294bc386de954385d128fd590c780c 100644 (file)
@@ -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);