diff options
Diffstat (limited to 'chip/it83xx/gpio.c')
-rw-r--r-- | chip/it83xx/gpio.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/chip/it83xx/gpio.c b/chip/it83xx/gpio.c index 7bdc41682c..09f7ff2492 100644 --- a/chip/it83xx/gpio.c +++ b/chip/it83xx/gpio.c @@ -330,8 +330,6 @@ void gpio_pre_init(void) } } - - /** * Handle a GPIO interrupt by calling the pins corresponding handler if * one exists. @@ -344,9 +342,9 @@ static void gpio_interrupt(int port, uint8_t mask) int i = 0; const struct gpio_info *g = gpio_list; - for (i = 0; i < GPIO_COUNT; i++, g++) { - if (port == g->port && (mask & g->mask) && g->irq_handler) { - g->irq_handler(i); + for (i = 0; i < GPIO_IH_COUNT; i++, g++) { + if (port == g->port && (mask & g->mask)) + gpio_irq_handlers[i](i); return; } } |