mfd: Handle tps65910 clear-mask correctly
Marcus Folkesson [Tue, 22 Nov 2011 13:39:51 +0000 (14:39 +0100)]
The function is not actually cleaing the bitmask.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
cherry picked from mainline's commit:
8f6a459a9daa6ce76d7c192f2cb3047fffb45ec8

Change-Id: I53d59ba72ecca513ef4b1ad265d578e493007660
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/77528
Reviewed-by: Automatic_Commit_Validation_User

drivers/mfd/tps65910.c

index 6f5b8cf..c1da84b 100644 (file)
@@ -120,7 +120,7 @@ int tps65910_clear_bits(struct tps65910 *tps65910, u8 reg, u8 mask)
                goto out;
        }
 
-       data &= mask;
+       data &= ~mask;
        err = tps65910_i2c_write(tps65910, reg, 1, &data);
        if (err)
                dev_err(tps65910->dev, "write to reg %x failed\n", reg);