diff options
Diffstat (limited to 'arch/mips/rb532')
-rw-r--r-- | arch/mips/rb532/irq.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/mips/rb532/irq.c b/arch/mips/rb532/irq.c index 53eeb5e7bc5b..f07882029a90 100644 --- a/arch/mips/rb532/irq.c +++ b/arch/mips/rb532/irq.c | |||
@@ -151,7 +151,8 @@ static void rb532_disable_irq(unsigned int irq_nr) | |||
151 | mask |= intr_bit; | 151 | mask |= intr_bit; |
152 | WRITE_MASK(addr, mask); | 152 | WRITE_MASK(addr, mask); |
153 | 153 | ||
154 | if (group == GPIO_MAPPED_IRQ_GROUP) | 154 | /* There is a maximum of 14 GPIO interrupts */ |
155 | if (group == GPIO_MAPPED_IRQ_GROUP && irq_nr <= (GROUP4_IRQ_BASE + 13)) | ||
155 | rb532_gpio_set_istat(0, irq_nr - GPIO_MAPPED_IRQ_BASE); | 156 | rb532_gpio_set_istat(0, irq_nr - GPIO_MAPPED_IRQ_BASE); |
156 | 157 | ||
157 | /* | 158 | /* |
@@ -174,7 +175,7 @@ static int rb532_set_type(unsigned int irq_nr, unsigned type) | |||
174 | int gpio = irq_nr - GPIO_MAPPED_IRQ_BASE; | 175 | int gpio = irq_nr - GPIO_MAPPED_IRQ_BASE; |
175 | int group = irq_to_group(irq_nr); | 176 | int group = irq_to_group(irq_nr); |
176 | 177 | ||
177 | if (group != GPIO_MAPPED_IRQ_GROUP) | 178 | if (group != GPIO_MAPPED_IRQ_GROUP || irq_nr > (GROUP4_IRQ_BASE + 13)) |
178 | return (type == IRQ_TYPE_LEVEL_HIGH) ? 0 : -EINVAL; | 179 | return (type == IRQ_TYPE_LEVEL_HIGH) ? 0 : -EINVAL; |
179 | 180 | ||
180 | switch (type) { | 181 | switch (type) { |