73f7cb9476a4109f206eff09cff5a08bdac991f0
[openwrt/staging/dedeckeh.git] /
1 From 59029739d42b439628e2f64f3d8f2db9be97deff Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Marek=20Beh=C3=BAn?= <kabel@kernel.org>
3 Date: Mon, 10 Jan 2022 00:15:17 +0100
4 Subject: [PATCH] PCI: aardvark: Use dev_fwnode() instead of
5 of_node_to_fwnode(dev->of_node)
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 Use simple
11 dev_fwnode(dev)
12 instead of
13 struct device_node *node = dev->of_node;
14 of_node_to_fwnode(node)
15 especially since the node variable is not used elsewhere in the function.
16
17 Signed-off-by: Marek BehĂșn <kabel@kernel.org>
18 ---
19 drivers/pci/controller/pci-aardvark.c | 3 +--
20 1 file changed, 1 insertion(+), 2 deletions(-)
21
22 --- a/drivers/pci/controller/pci-aardvark.c
23 +++ b/drivers/pci/controller/pci-aardvark.c
24 @@ -1301,7 +1301,6 @@ static struct msi_domain_info advk_msi_d
25 static int advk_pcie_init_msi_irq_domain(struct advk_pcie *pcie)
26 {
27 struct device *dev = &pcie->pdev->dev;
28 - struct device_node *node = dev->of_node;
29 phys_addr_t msi_msg_phys;
30
31 mutex_init(&pcie->msi_used_lock);
32 @@ -1320,7 +1319,7 @@ static int advk_pcie_init_msi_irq_domain
33 return -ENOMEM;
34
35 pcie->msi_domain =
36 - pci_msi_create_irq_domain(of_node_to_fwnode(node),
37 + pci_msi_create_irq_domain(dev_fwnode(dev),
38 &advk_msi_domain_info,
39 pcie->msi_inner_domain);
40 if (!pcie->msi_domain) {