aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/controller/pcie-altera.c
diff options
context:
space:
mode:
authorJiri Slaby (SUSE) <[email protected]>2025-06-11 10:43:44 +0000
committerBjorn Helgaas <[email protected]>2025-07-24 21:00:47 +0000
commita103d2dede5683dabbac2c3374bc24b6a9434478 (patch)
tree56b2ba700230ce185bdc20b4806179c1a79f33e2 /drivers/pci/controller/pcie-altera.c
parentLinux 6.16-rc1 (diff)
downloadkernel-a103d2dede5683dabbac2c3374bc24b6a9434478.tar.gz
kernel-a103d2dede5683dabbac2c3374bc24b6a9434478.zip
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) <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> # altera [bhelgaas: squash together, rebase to precede msi-parent] Signed-off-by: Bjorn Helgaas <[email protected]> Link: https://patch.msgid.link/[email protected] Link: https://patch.msgid.link/[email protected] Link: https://patch.msgid.link/[email protected]
Diffstat (limited to 'drivers/pci/controller/pcie-altera.c')
-rw-r--r--drivers/pci/controller/pcie-altera.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pci/controller/pcie-altera.c b/drivers/pci/controller/pcie-altera.c
index 0fc77176a52e..3dbb7adc421c 100644
--- a/drivers/pci/controller/pcie-altera.c
+++ b/drivers/pci/controller/pcie-altera.c
@@ -852,10 +852,9 @@ static void aglx_isr(struct irq_desc *desc)
static int altera_pcie_init_irq_domain(struct altera_pcie *pcie)
{
struct device *dev = &pcie->pdev->dev;
- struct device_node *node = dev->of_node;
/* Setup INTx */
- pcie->irq_domain = irq_domain_create_linear(of_fwnode_handle(node), PCI_NUM_INTX,
+ pcie->irq_domain = irq_domain_create_linear(dev_fwnode(dev), PCI_NUM_INTX,
&intx_domain_ops, pcie);
if (!pcie->irq_domain) {
dev_err(dev, "Failed to get a INTx IRQ domain\n");