Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Mark Brown and committed by
Samuel Ortiz
7fdb5d32 52b461b8

+3 -5
+3 -5
drivers/mfd/wm8350-irq.c
··· 432 432 for (i = 0; i < ARRAY_SIZE(wm8350->irq_masks); i++) { 433 433 /* If there's been a change in the mask write it back 434 434 * to the hardware. */ 435 - if (wm8350->irq_masks[i] != 436 - wm8350->reg_cache[WM8350_INT_STATUS_1_MASK + i]) 437 - WARN_ON(wm8350_reg_write(wm8350, 438 - WM8350_INT_STATUS_1_MASK + i, 439 - wm8350->irq_masks[i])); 435 + WARN_ON(regmap_update_bits(wm8350->regmap, 436 + WM8350_INT_STATUS_1_MASK + i, 437 + 0xffff, wm8350->irq_masks[i])); 440 438 } 441 439 442 440 mutex_unlock(&wm8350->irq_lock);