Skip to content

Commit 9cf4843

Browse files
Mani-SadhasivamLorenzo Pieralisi
authored andcommitted
PCI: qcom-ep: Make use of the cached dev pointer
In the qcom_pcie_ep_get_resources() function, dev pointer is already cached in a local variable. So let's make use of it instead of getting the dev pointer again from pdev struct. Link: https://lore.kernel.org/r/20220914075350.7992-4-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
1 parent e2efd31 commit 9cf4843

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/pci/controller/dwc/pcie-qcom-ep.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ static int qcom_pcie_ep_get_resources(struct platform_device *pdev,
483483

484484
ret = qcom_pcie_ep_get_io_resources(pdev, pcie_ep);
485485
if (ret) {
486-
dev_err(&pdev->dev, "Failed to get io resources %d\n", ret);
486+
dev_err(dev, "Failed to get io resources %d\n", ret);
487487
return ret;
488488
}
489489

@@ -505,7 +505,7 @@ static int qcom_pcie_ep_get_resources(struct platform_device *pdev,
505505
if (IS_ERR(pcie_ep->wake))
506506
return PTR_ERR(pcie_ep->wake);
507507

508-
pcie_ep->phy = devm_phy_optional_get(&pdev->dev, "pciephy");
508+
pcie_ep->phy = devm_phy_optional_get(dev, "pciephy");
509509
if (IS_ERR(pcie_ep->phy))
510510
ret = PTR_ERR(pcie_ep->phy);
511511

0 commit comments

Comments
 (0)