diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-06-03 08:37:23 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-07-08 18:16:10 -0400 |
commit | 7fdb5d32614f7784fc7c2b8e883eb4da26358a94 (patch) | |
tree | 6f08d61db842a60fb66b24209f608fc31d141827 /drivers/mfd/wm8350-irq.c | |
parent | 52b461b86a9f6c7a86bdcb858e1bbef089fbe6a0 (diff) |
mfd: Rely on regmap cache in wm8350 interrupt controller
We can just use regmap_update_bits() to achieve the same effect - it will
do the read/modify/update cycle for us.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/wm8350-irq.c')
-rw-r--r-- | drivers/mfd/wm8350-irq.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/mfd/wm8350-irq.c b/drivers/mfd/wm8350-irq.c index 9fd01bf63c51..624ff90501cd 100644 --- a/drivers/mfd/wm8350-irq.c +++ b/drivers/mfd/wm8350-irq.c | |||
@@ -432,11 +432,9 @@ static void wm8350_irq_sync_unlock(struct irq_data *data) | |||
432 | for (i = 0; i < ARRAY_SIZE(wm8350->irq_masks); i++) { | 432 | for (i = 0; i < ARRAY_SIZE(wm8350->irq_masks); i++) { |
433 | /* If there's been a change in the mask write it back | 433 | /* If there's been a change in the mask write it back |
434 | * to the hardware. */ | 434 | * to the hardware. */ |
435 | if (wm8350->irq_masks[i] != | 435 | WARN_ON(regmap_update_bits(wm8350->regmap, |
436 | wm8350->reg_cache[WM8350_INT_STATUS_1_MASK + i]) | 436 | WM8350_INT_STATUS_1_MASK + i, |
437 | WARN_ON(wm8350_reg_write(wm8350, | 437 | 0xffff, wm8350->irq_masks[i])); |
438 | WM8350_INT_STATUS_1_MASK + i, | ||
439 | wm8350->irq_masks[i])); | ||
440 | } | 438 | } |
441 | 439 | ||
442 | mutex_unlock(&wm8350->irq_lock); | 440 | mutex_unlock(&wm8350->irq_lock); |