On Mon, 2014-08-18 at 09:28AM -0700, Alexandre Courbot wrote: > On Mon, Aug 18, 2014 at 2:54 AM, Lars-Peter Clausen <lars@xxxxxxxxxx> wrote: > > When looking up the IRQ the bank offset needs to be taken into account. > > Otherwise interrupts for banks other than bank 0 get incorrectly reported as > > interrupts for bank 0. > > > > Signed-off-by: Lars-Peter Clausen <lars@xxxxxxxxxx> > > --- > > Changes since v1: > > * Use lookup table instead of switch-case. > > --- > > drivers/gpio/gpio-zynq.c | 10 +++++++++- > > 1 file changed, 9 insertions(+), 1 deletion(-) > > Yep, you saved 16 lines compared to the first version of this patch. :) > > I assume overflows over this array cannot happen (otherwise a quick > check against ARRAY_SIZE(zynq_gpio_bank_offset) would do the trick), > if so: I think that overflow is impossible since we are in a for-loop that runs from 0..(ZYNQ_GPIO_MAX_BANK - 1). > > Acked-by: Alexandre Courbot <acourbot@xxxxxxxxxx> For the series: Acked-by: Soren Brinkmann <soren.brinkmann@xxxxxxxxxx> Thanks, Sören -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html