summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpiolib.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2021-10-27 00:16:14 +0200
committerLinus Walleij <linus.walleij@linaro.org>2021-10-27 00:16:14 +0200
commit5853fd57d8933f0b667ed467fe30a086112af6c9 (patch)
tree3c811b3fc8c81891d1cd9079f019e3ac4ba1e8a9 /drivers/gpio/gpiolib.c
parentf0c142fcf4d6a671109d6bd00d77993e65fb9f47 (diff)
parentcfe6807d82e97e81c3209dca9448f091e1448a57 (diff)
Merge branch 'ib-gpio-ppid' into devel
Diffstat (limited to 'drivers/gpio/gpiolib.c')
-rw-r--r--drivers/gpio/gpiolib.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index d1b9b721218f..abfbf546d159 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1534,9 +1534,14 @@ static int gpiochip_add_irqchip(struct gpio_chip *gc,
}
if (gc->irq.parent_handler) {
- void *data = gc->irq.parent_handler_data ?: gc;
-
for (i = 0; i < gc->irq.num_parents; i++) {
+ void *data;
+
+ if (gc->irq.per_parent_data)
+ data = gc->irq.parent_handler_data_array[i];
+ else
+ data = gc->irq.parent_handler_data ?: gc;
+
/*
* The parent IRQ chip is already using the chip_data
* for this IRQ chip, so our callbacks simply use the