diff options
author | Zubair Lutfullah <zubair.lutfullah@gmail.com> | 2013-08-13 12:40:56 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2013-08-14 13:55:40 -0400 |
commit | 5d945d94a15435d2a3a3b99e538fc8fc7558afc5 (patch) | |
tree | 3ea97c7182c86db80f6ed6f74b7351469d08122f | |
parent | b018e1361bad361b47294fd09ae1f33f707dd933 (diff) |
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 <zubair.lutfullah@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r-- | drivers/mfd/ti_am335x_tscadc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c index 9f3f07ad54bd..baaf5a8123bb 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); | |||
67 | void am335x_tsc_se_clr(struct ti_tscadc_dev *tsadc, u32 val) | 67 | void am335x_tsc_se_clr(struct ti_tscadc_dev *tsadc, u32 val) |
68 | { | 68 | { |
69 | spin_lock(&tsadc->reg_lock); | 69 | spin_lock(&tsadc->reg_lock); |
70 | tsadc->reg_se_cache = tscadc_readl(tsadc, REG_SE); | ||
70 | tsadc->reg_se_cache &= ~val; | 71 | tsadc->reg_se_cache &= ~val; |
71 | spin_unlock(&tsadc->reg_lock); | ||
72 | |||
73 | am335x_tsc_se_update(tsadc); | 72 | am335x_tsc_se_update(tsadc); |
73 | spin_unlock(&tsadc->reg_lock); | ||
74 | } | 74 | } |
75 | EXPORT_SYMBOL_GPL(am335x_tsc_se_clr); | 75 | EXPORT_SYMBOL_GPL(am335x_tsc_se_clr); |
76 | 76 | ||