Merge remote-tracking branches 'regmap/topic/patch' and 'regmap/topic/sync' into...
[deliverable/linux.git] / drivers / base / regmap / regcache-lzo.c
index f0f04060a4ecfd45672354c1106c10b9b536f887..8d0061569326b9a79024a03a4ec1023c18ab0bde 100644 (file)
@@ -349,6 +349,12 @@ static int regcache_lzo_sync(struct regmap *map, unsigned int min,
                ret = regcache_read(map, i, &val);
                if (ret)
                        return ret;
+
+               /* Is this the hardware default?  If so skip. */
+               ret = regcache_lookup_reg(map, i);
+               if (ret > 0 && val == map->reg_defaults[ret].def)
+                       continue;
+
                map->cache_bypass = 1;
                ret = _regmap_write(map, i, val);
                map->cache_bypass = 0;
This page took 0.024431 seconds and 5 git commands to generate.