提交 f65a5648 编写于 作者: P Phil Elwell 提交者: Zheng Zengkai

pinctrl: bcm2835: Accept fewer than expected IRQs

raspberrypi inclusion
category: feature
bugzilla: 50432

--------------------------------

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: NPhil Elwell <phil@raspberrypi.com>
Signed-off-by: NFang Yafen <yafen@iscas.ac.cn>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 77d7e142
...@@ -1288,9 +1288,13 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev) ...@@ -1288,9 +1288,13 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev)
char *name; char *name;
girq->parents[i] = irq_of_parse_and_map(np, i); girq->parents[i] = irq_of_parse_and_map(np, i);
if (!is_7211) if (!is_7211) {
if (!girq->parents[i]) {
girq->num_parents = i;
break;
}
continue; continue;
}
/* Skip over the all banks interrupts */ /* Skip over the all banks interrupts */
pc->wake_irq[i] = irq_of_parse_and_map(np, i + pc->wake_irq[i] = irq_of_parse_and_map(np, i +
BCM2835_NUM_IRQS + 1); BCM2835_NUM_IRQS + 1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册