mfd: max77663: Fixed that updating wrong value into cache value
Jin Park [Fri, 9 Sep 2011 06:46:10 +0000 (15:46 +0900)]
Fixed that updating wrong value into cache value after i2c write
in the max77663_cache_write function.

Bug 849360

Change-Id: I62ba38bc2a10f0240cbbefeb71ab5337308d79df
Signed-off-by: Jin Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/51517
(cherry picked from commit da82c830774b6d63f148d4fc9c23922d1c86a0a3)
Reviewed-on: http://git-master/r/54693
(cherry picked from commit a9f47c7de19faf4480c93f1874399345738276f4)
Reviewed-on: http://git-master/r/55470
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

Rebase-Id: R93fec5fedf29fc6b52a3f79b4688c28916582934

drivers/mfd/max77663-core.c

index 349e5f5..b4f36a1 100644 (file)
@@ -360,7 +360,7 @@ static inline int max77663_cache_write(struct device *dev, u8 addr, u8 mask,
                ret = max77663_write(dev, addr, &new_val, 1, 0);
                if (ret < 0)
                        return ret;
-               *cache = val;
+               *cache = new_val;
        }
        return 0;
 }