mfd: Fix off by one in WM831x IRQ code
Subsystems (2)
PATCH 1/1 mfd: Fix off by one in WM831x IRQ code
From: Dimitris Papastamos <[email protected]>
The GPIO IRQs aren't the first IRQs defined, we need to subtract the base for the GPIOs as well to use them for array indexes.
Signed-off-by Dimitris Papastamos <[email protected]>
Signed-off-by Mark Brown <[email protected]>
--- drivers/mfd/wm831x-irq.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/mfd/wm831x-irq.c +5 -0
@@ -408,6 +408,11 @@ static int wm831x_irq_set_type(struct irq_data *data, unsigned int type)return -EINVAL ; } +/* Rebase the IRQ into the GPIO range so we've got a sensible array +* index. +*/ + irq -=WM831X_IRQ_GPIO_1 ; +/* We set the high bit to flag that we need an update; don't * do the update here as we can be called with the bus lock * held.
Signature · 1 line
1.7.5.4
Hi Mark,
Quoted 4 lines · Mark Brown
From: Dimitris Papastamos <[email protected]>
The GPIO IRQs aren't the first IRQs defined, we need to subtract the base for the GPIOs as well to use them for array indexes.
Patch applied to my for-next branch, thanks.
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/