Merge remote-tracking branches 'regmap/topic/cache', 'regmap/topic/irq', 'regmap...
authorMark Brown <broonie@linaro.org>
Fri, 28 Mar 2014 11:50:43 +0000 (11:50 +0000)
committerMark Brown <broonie@linaro.org>
Fri, 28 Mar 2014 11:50:43 +0000 (11:50 +0000)
1  2  3  4  5  6  7  8 
drivers/base/regmap/regcache.c
drivers/base/regmap/regmap.c
include/linux/regmap.h

Simple merge
index 92d9b79ff93eda07970071f384403004c9bab901,6a19515f8a458b3719fce7325f265a60a4d147a4,6a19515f8a458b3719fce7325f265a60a4d147a4,35077374f38b3b5031d20c276423780bba531a9f,6a19515f8a458b3719fce7325f265a60a4d147a4,43065ceff90f9402f03e752910eeb44c597fa122,4b2ed0c9e80dba4aaaf6257fb2ce1816c383893a,c69bbc06dfbb58b8fe727f17d41d766343cd2bec..d0a072463a04ff1c4d3f83cbd66de587be4c5e44
@@@@@@@@@ -2188,34 -2185,34 -2185,34 -2189,34 -2185,34 -2200,34 -2185,34 -2390,28 +2412,28 @@@@@@@@@ int regmap_register_patch(struct regma
                    num_regs))
                        return 0;
        
--- ---         map->lock(map->lock_arg);
--- --- 
--- ---         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++) {
--- ---                 ret = _regmap_write(map, regs[i].reg, regs[i].def);
--- ---                 if (ret != 0) {
--- ---                         dev_err(map->dev, "Failed to write %x = %x: %d\n",
--- ---                                 regs[i].reg, regs[i].def, ret);
--- ---                         goto out;
--- ---                 }
--- ---         }
--- --- 
       +        p = krealloc(map->patch,
       +                     sizeof(struct reg_default) * (map->patch_regs + num_regs),
       +                     GFP_KERNEL);
       +        if (p) {
       +                memcpy(p + map->patch_regs, regs, num_regs * sizeof(*regs));
       +                map->patch = p;
       +                map->patch_regs += num_regs;
       +        } else {
--- ---                 ret = -ENOMEM;
+++ ++++                return -ENOMEM;
       +        }
       +
+++ +++         map->lock(map->lock_arg);
+++ +++ 
+++ +++         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++) {
   -                    ret = _regmap_write(map, regs[i].reg, regs[i].def);
   -                    if (ret != 0) {
   -                            dev_err(map->dev, "Failed to write %x = %x: %d\n",
   -                                    regs[i].reg, regs[i].def, ret);
   -                            goto out;
   -                    }
   -            }
+++++++         ret = _regmap_multi_reg_write(map, regs, num_regs);
+++++++         if (ret != 0)
+++++++                 goto out;
+++ +++ 
       -        p = krealloc(map->patch,
       -                     sizeof(struct reg_default) * (map->patch_regs + num_regs),
       -                     GFP_KERNEL);
       -        if (p) {
       -                memcpy(p + map->patch_regs, regs, num_regs * sizeof(*regs));
       -                map->patch = p;
       -                map->patch_regs += num_regs;
       -        } else {
       -                ret = -ENOMEM;
       -        }
       -
        out:
                map->async = false;
                map->cache_bypass = bypass;
Simple merge