Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH] PCI: mediatek: Find INTx controller by property
@ 2026-08-05  6:05 aquapinn
  2026-08-05  6:16 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: aquapinn @ 2026-08-05  6:05 UTC (permalink / raw)
  To: Ryder Lee, Lorenzo Pieralisi, Krzysztof Wilczyński,
	Manivannan Sadhasivam, Rob Herring, Bjorn Helgaas,
	Matthias Brugger, AngeloGioacchino Del Regno, linux-pci,
	linux-mediatek, linux-kernel, linux-arm-kernel
  Cc: zhengping.zhang, lei.dong, hui.ma, upstream, Zhengping Zhang

From: Zhengping Zhang <aquapinn@qq.com>

All existing DTS users already name the INTx child node
"interrupt-controller". Use of_get_child_by_name() to find it instead
of assuming it is the first child node.

Signed-off-by: Zhengping Zhang <aquapinn@qq.com>
---
 drivers/pci/controller/pcie-mediatek.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c
index 8b57c3d75b94..7b54f3dc6cf8 100644
--- a/drivers/pci/controller/pcie-mediatek.c
+++ b/drivers/pci/controller/pcie-mediatek.c
@@ -572,9 +572,9 @@ static int mtk_pcie_init_irq_domain(struct mtk_pcie_port *port,
 	int ret;
 
 	/* Setup INTx */
-	pcie_intc_node = of_get_next_child(node, NULL);
+	pcie_intc_node = of_get_child_by_name(node, "interrupt-controller");
 	if (!pcie_intc_node) {
-		dev_err(dev, "no PCIe Intc node found\n");
+		dev_err(dev, "no PCIe INTx interrupt-controller node found\n");
 		return -ENODEV;
 	}
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-05  6:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-05  6:05 [PATCH] PCI: mediatek: Find INTx controller by property aquapinn
2026-08-05  6:16 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox