mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
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>
This commit is contained in:
@@ -1169,8 +1169,13 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev)
|
||||
* bank that was firing the IRQ and look up the per-group
|
||||
* and bank data.
|
||||
*/
|
||||
for (i = 0; i < BCM2835_NUM_IRQS; i++)
|
||||
for (i = 0; i < BCM2835_NUM_IRQS; i++) {
|
||||
girq->parents[i] = irq_of_parse_and_map(np, i);
|
||||
if (!girq->parents[i]) {
|
||||
girq->num_parents = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
girq->default_type = IRQ_TYPE_NONE;
|
||||
girq->handler = handle_level_irq;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user