diff mbox

[2/7] PCI: layerscape: Pass device-specific struct to internal functions

Message ID 20161007164202.26341.96850.stgit@bhelgaas-glaptop2.roam.corp.google.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Bjorn Helgaas Oct. 7, 2016, 4:42 p.m. UTC
Only interfaces used from outside the driver, e.g., those called by the
DesignWare core, need to accept pointers to the generic struct pcie_port.
Internal interfaces can accept pointers to the device-specific struct,
which makes them more straightforward.  No functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/host/pci-layerscape.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/drivers/pci/host/pci-layerscape.c b/drivers/pci/host/pci-layerscape.c
index a1dccb0..85a90f1e 100644
--- a/drivers/pci/host/pci-layerscape.c
+++ b/drivers/pci/host/pci-layerscape.c
@@ -212,11 +212,11 @@  static const struct of_device_id ls_pcie_of_match[] = {
 	{ },
 };
 
-static int __init ls_add_pcie_port(struct pcie_port *pp,
+static int __init ls_add_pcie_port(struct ls_pcie *ls,
 				   struct platform_device *pdev)
 {
+	struct pcie_port *pp = &ls->pp;
 	int ret;
-	struct ls_pcie *ls = to_ls_pcie(pp);
 
 	pp->dev = &pdev->dev;
 	pp->dbi_base = ls->dbi;
@@ -259,7 +259,7 @@  static int __init ls_pcie_probe(struct platform_device *pdev)
 	if (!ls_pcie_is_bridge(ls))
 		return -ENODEV;
 
-	ret = ls_add_pcie_port(&ls->pp, pdev);
+	ret = ls_add_pcie_port(ls, pdev);
 	if (ret < 0)
 		return ret;