Skip to content

Commit 7fdb5d3

Browse files
broonieSamuel Ortiz
authored andcommitted
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>
1 parent 52b461b commit 7fdb5d3

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

‎drivers/mfd/wm8350-irq.c‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -432,11 +432,9 @@ static void wm8350_irq_sync_unlock(struct irq_data *data)
432432
for (i = 0; i < ARRAY_SIZE(wm8350->irq_masks); i++) {
433433
/* If there's been a change in the mask write it back
434434
* 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]));
440438
}
441439

442440
mutex_unlock(&wm8350->irq_lock);

0 commit comments

Comments
 (0)