Skip to content

Commit

Permalink
PCI: aardvark: Use dev_fwnode() instead of of_node_to_fwnode(dev->of_…
Browse files Browse the repository at this point in the history
…node)

commit 222af78 upstream.

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>
Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
elkablo authored and gregkh committed May 12, 2022
1 parent fcf2764 commit 8616e0e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/pci/controller/pci-aardvark.c
Expand Up @@ -1294,7 +1294,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);
Expand All @@ -1313,7 +1312,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) {
Expand Down

0 comments on commit 8616e0e

Please sign in to comment.