From: Zubair Lutfullah Date: Tue, 13 Aug 2013 16:40:56 +0000 (+0100) Subject: mfd: ti_am335x_tscadc: Update reg_cache variable in clr function X-Git-Tag: v3.12-rc1~100^2~7^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d945d94a15435d2a3a3b99e538fc8fc7558afc5;p=platform%2Fkernel%2Flinux-exynos.git mfd: ti_am335x_tscadc: Update reg_cache variable in clr function The reg_cache variable should be updated with current steps in the reg_se register. Then the mask should apply and clear the register. Previously, the reg_cache can be an old redundant value that isn't updated. Signed-off-by: Zubair Lutfullah Signed-off-by: Lee Jones --- diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c index 9f3f07a..baaf5a8 100644 --- a/drivers/mfd/ti_am335x_tscadc.c +++ b/drivers/mfd/ti_am335x_tscadc.c @@ -67,10 +67,10 @@ EXPORT_SYMBOL_GPL(am335x_tsc_se_set); void am335x_tsc_se_clr(struct ti_tscadc_dev *tsadc, u32 val) { spin_lock(&tsadc->reg_lock); + tsadc->reg_se_cache = tscadc_readl(tsadc, REG_SE); tsadc->reg_se_cache &= ~val; - spin_unlock(&tsadc->reg_lock); - am335x_tsc_se_update(tsadc); + spin_unlock(&tsadc->reg_lock); } EXPORT_SYMBOL_GPL(am335x_tsc_se_clr);