Commit 7fdb5d32 authored by Mark Brown's avatar Mark Brown Committed by Samuel Ortiz

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: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 52b461b8
......@@ -432,11 +432,9 @@ static void wm8350_irq_sync_unlock(struct irq_data *data)
for (i = 0; i < ARRAY_SIZE(wm8350->irq_masks); i++) {
/* If there's been a change in the mask write it back
* to the hardware. */
if (wm8350->irq_masks[i] !=
wm8350->reg_cache[WM8350_INT_STATUS_1_MASK + i])
WARN_ON(wm8350_reg_write(wm8350,
WARN_ON(regmap_update_bits(wm8350->regmap,
WM8350_INT_STATUS_1_MASK + i,
wm8350->irq_masks[i]));
0xffff, wm8350->irq_masks[i]));
}
mutex_unlock(&wm8350->irq_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment