]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PCI: mediatek-gen3: Move mtk_pcie_setup_irq() out of mtk_pcie_setup()
authorChen-Yu Tsai <wenst@chromium.org>
Tue, 24 Mar 2026 05:19:54 +0000 (13:19 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 25 Mar 2026 18:47:42 +0000 (13:47 -0500)
commiteddbac092e5f1edcf502056348d98acb811dbb31
tree5b2b3f67bf7e3036b8d451a885c75a508e0ec132
parent98752193de5b3306b6815cba5a217337c2a93876
PCI: mediatek-gen3: Move mtk_pcie_setup_irq() out of mtk_pcie_setup()

mtk_pcie_setup_irq() sets up the IRQ domains for PCI INTx and MSI, and
chains them to the controller's interrupt. It doesn't touch the PCIe
controller itself.

Move mtk_pcie_setup_irq() out of mtk_pcie_setup(), do it earlier so there's
nothing to clean up if it fails, and add an error message if it does fail.
Reorder mtk_pcie_irq_teardown() in the remove callback to follow. Also
create an error path in the probe function.

Suggested-by: Bjorn Helgaas <helgaas@kernel.org>
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
[bhelgaas: commit log]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260324052002.4072430-3-wenst@chromium.org
drivers/pci/controller/pcie-mediatek-gen3.c