]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PCI: controller: Use dev_fwnode() instead of of_fwnode_handle()
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Wed, 11 Jun 2025 10:43:44 +0000 (12:43 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 24 Jul 2025 21:00:47 +0000 (16:00 -0500)
commita103d2dede5683dabbac2c3374bc24b6a9434478
tree56b2ba700230ce185bdc20b4806179c1a79f33e2
parent19272b37aa4f83ca52bdf9c16d5d81bdd1354494
PCI: controller: Use dev_fwnode() instead of of_fwnode_handle()

All irq_domain functions now accept fwnode instead of of_node. But many
PCI controllers still extract dev to of_node and then of_node to fwnode.

Instead, clean this up and simply use the dev_fwnode() helper to extract
fwnode directly from dev. Internally, it still does dev => of_node =>
fwnode steps, but it's now hidden from the users.

In the case of altera, this also removes an unused 'node' variable that is
only used when CONFIG_OF is enabled:

  drivers/pci/controller/pcie-altera.c: In function 'altera_pcie_init_irq_domain':
  drivers/pci/controller/pcie-altera.c:855:29: error: unused variable 'node' [-Werror=unused-variable]
    855 |         struct device_node *node = dev->of_node;

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de> # altera
[bhelgaas: squash together, rebase to precede msi-parent]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20250521163329.2137973-1-arnd@kernel.org
Link: https://patch.msgid.link/20250611104348.192092-16-jirislaby@kernel.org
Link: https://patch.msgid.link/20250723065907.1841758-1-jirislaby@kernel.org
drivers/pci/controller/dwc/pcie-designware-host.c
drivers/pci/controller/mobiveil/pcie-mobiveil-host.c
drivers/pci/controller/pcie-altera-msi.c
drivers/pci/controller/pcie-altera.c
drivers/pci/controller/pcie-mediatek-gen3.c
drivers/pci/controller/pcie-mediatek.c
drivers/pci/controller/pcie-xilinx-dma-pl.c
drivers/pci/controller/pcie-xilinx-nwl.c
drivers/pci/controller/plda/pcie-plda-host.c