diff options
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-pca953x.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c index a610864b7e13..ce5736e83620 100644 --- a/drivers/gpio/gpio-pca953x.c +++ b/drivers/gpio/gpio-pca953x.c | |||
@@ -474,12 +474,16 @@ static int pca953x_irq_setup(struct pca953x_chip *chip, | |||
474 | * this purpose. | 474 | * this purpose. |
475 | */ | 475 | */ |
476 | chip->irq_stat &= chip->reg_direction; | 476 | chip->irq_stat &= chip->reg_direction; |
477 | chip->irq_base = pdata->irq_base; | ||
478 | mutex_init(&chip->irq_lock); | 477 | mutex_init(&chip->irq_lock); |
479 | 478 | ||
479 | chip->irq_base = irq_alloc_descs(-1, pdata->irq_base, chip->gpio_chip.ngpio, -1); | ||
480 | if (chip->irq_base < 0) | ||
481 | goto out_failed; | ||
482 | |||
480 | for (lvl = 0; lvl < chip->gpio_chip.ngpio; lvl++) { | 483 | for (lvl = 0; lvl < chip->gpio_chip.ngpio; lvl++) { |
481 | int irq = lvl + chip->irq_base; | 484 | int irq = lvl + chip->irq_base; |
482 | 485 | ||
486 | irq_clear_status_flags(irq, IRQ_NOREQUEST); | ||
483 | irq_set_chip_data(irq, chip); | 487 | irq_set_chip_data(irq, chip); |
484 | irq_set_chip_and_handler(irq, &pca953x_irq_chip, | 488 | irq_set_chip_and_handler(irq, &pca953x_irq_chip, |
485 | handle_simple_irq); | 489 | handle_simple_irq); |