summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/wm8994-irq.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-03-18 12:50:10 +0000
committerSamuel Ortiz <sameo@linux.intel.com>2011-03-23 10:42:11 +0100
commit316b6cc081b112546842d44ded21512bd8454a85 (patch)
tree8159c62fb4e04cc98beef9a4c6543bbc7f502204 /drivers/mfd/wm8994-irq.c
parent8bd4d7c4c500e88bff975bbcb7fe0d89da319cdd (diff)
mfd: Push byte swaps out of wm8994 bulk read path
For consistency with the write path push byte swaps of the WM8994 register data out of the bulk read data path into the per-register APIs. The only user of the bulk register read is the interrupt code which is updated to do the swaps itself part of this patch. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/wm8994-irq.c')
-rw-r--r--drivers/mfd/wm8994-irq.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mfd/wm8994-irq.c b/drivers/mfd/wm8994-irq.c
index f5e439a37dc..1e3bf4a2ff8 100644
--- a/drivers/mfd/wm8994-irq.c
+++ b/drivers/mfd/wm8994-irq.c
@@ -225,9 +225,11 @@ static irqreturn_t wm8994_irq_thread(int irq, void *data)
return IRQ_NONE;
}
- /* Apply masking */
- for (i = 0; i < WM8994_NUM_IRQ_REGS; i++)
+ /* Bit swap and apply masking */
+ for (i = 0; i < WM8994_NUM_IRQ_REGS; i++) {
+ status[i] = be16_to_cpu(status[i]);
status[i] &= ~wm8994->irq_masks_cur[i];
+ }
/* Report */
for (i = 0; i < ARRAY_SIZE(wm8994_irqs); i++) {