PCI: aardvark: Use dev_fwnode() instead of of_node_to_fwnode(dev->of_node)
authorMarek Behún <kabel@kernel.org>
Mon, 10 Jan 2022 01:50:03 +0000 (02:50 +0100)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tue, 8 Feb 2022 10:43:01 +0000 (10:43 +0000)
Use simple
  dev_fwnode(dev)
instead of
  struct device_node *node = dev->of_node;
  of_node_to_fwnode(node)
especially since the node variable is not used elsewhere in the function.

Link: https://lore.kernel.org/r/20220110015018.26359-9-kabel@kernel.org
Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
drivers/pci/controller/pci-aardvark.c

index 060fa451bb40742c4568d64796b3c5b2183f1d41..bf2a99a5a5765cb983cbc55ee20fee3f2024cd33 100644 (file)
@@ -1292,7 +1292,6 @@ static struct msi_domain_info advk_msi_domain_info = {
 static int advk_pcie_init_msi_irq_domain(struct advk_pcie *pcie)
 {
        struct device *dev = &pcie->pdev->dev;
-       struct device_node *node = dev->of_node;
        phys_addr_t msi_msg_phys;
 
        mutex_init(&pcie->msi_used_lock);
@@ -1311,7 +1310,7 @@ static int advk_pcie_init_msi_irq_domain(struct advk_pcie *pcie)
                return -ENOMEM;
 
        pcie->msi_domain =
-               pci_msi_create_irq_domain(of_node_to_fwnode(node),
+               pci_msi_create_irq_domain(dev_fwnode(dev),
                                          &advk_msi_domain_info,
                                          pcie->msi_inner_domain);
        if (!pcie->msi_domain) {