Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pinctrl: bcm2835: Accept fewer than expected IRQs

The downstream .dts files only request two GPIO IRQs. Truncate the
array of parent IRQs when irq_of_parse_and_map returns 0.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Signed-off-by: Ivan T. Ivanov <iivanov@suse.de>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20210521090158.26932-1-iivanov@suse.de
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Phil Elwell and committed by
Linus Walleij
4bc80da5 b9045af9

+6 -2
+6 -2
drivers/pinctrl/bcm/pinctrl-bcm2835.c
··· 1274 1274 char *name; 1275 1275 1276 1276 girq->parents[i] = irq_of_parse_and_map(np, i); 1277 - if (!is_7211) 1277 + if (!is_7211) { 1278 + if (!girq->parents[i]) { 1279 + girq->num_parents = i; 1280 + break; 1281 + } 1278 1282 continue; 1279 - 1283 + } 1280 1284 /* Skip over the all banks interrupts */ 1281 1285 pc->wake_irq[i] = irq_of_parse_and_map(np, i + 1282 1286 BCM2835_NUM_IRQS + 1);