summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/gpio/gpio-stmpe.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/drivers/gpio/gpio-stmpe.c b/drivers/gpio/gpio-stmpe.c
index 542706a852e6..395ee51445ea 100644
--- a/drivers/gpio/gpio-stmpe.c
+++ b/drivers/gpio/gpio-stmpe.c
@@ -507,6 +507,8 @@ static int stmpe_gpio_probe(struct platform_device *pdev)
}
if (irq > 0) {
+ struct gpio_irq_chip *girq;
+
ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
stmpe_gpio_irq, IRQF_ONESHOT,
"stmpe-gpio", stmpe_gpio);
@@ -514,20 +516,16 @@ static int stmpe_gpio_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "unable to get irq: %d\n", ret);
goto out_disable;
}
- ret = gpiochip_irqchip_add_nested(&stmpe_gpio->chip,
- &stmpe_gpio_irq_chip,
- 0,
- handle_simple_irq,
- IRQ_TYPE_NONE);
- if (ret) {
- dev_err(&pdev->dev,
- "could not connect irqchip to gpiochip\n");
- goto out_disable;
- }
- gpiochip_set_nested_irqchip(&stmpe_gpio->chip,
- &stmpe_gpio_irq_chip,
- irq);
+ girq = &stmpe_gpio->chip.irq;
+ girq->chip = &stmpe_gpio_irq_chip;
+ /* This will let us handle the parent IRQ in the driver */
+ girq->parent_handler = NULL;
+ girq->num_parents = 0;
+ girq->parents = NULL;
+ girq->default_type = IRQ_TYPE_NONE;
+ girq->handler = handle_simple_irq;
+ girq->threaded = true;
}
platform_set_drvdata(pdev, stmpe_gpio);