diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2016-10-06 13:38:05 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-10-11 23:14:25 -0500 |
commit | 7b0b11133cbf14fe7113a7fa8506ac18f35c9ea5 (patch) | |
tree | 206df3710b166954e1353ed02244a2062ed909b3 /drivers/pci | |
parent | d41d2959593b920e855cdd8d1829c33d34fb1071 (diff) |
PCI: layerscape: Pass device-specific struct to internal functions
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>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/host/pci-layerscape.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pci/host/pci-layerscape.c b/drivers/pci/host/pci-layerscape.c index bdafe55ad00e..2b312960d019 100644 --- a/drivers/pci/host/pci-layerscape.c +++ b/drivers/pci/host/pci-layerscape.c @@ -213,12 +213,12 @@ 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 *pcie, struct platform_device *pdev) { struct device *dev = &pdev->dev; + struct pcie_port *pp = &pcie->pp; int ret; - struct ls_pcie *pcie = to_ls_pcie(pp); pp->dev = dev; pp->ops = pcie->drvdata->ops; @@ -261,7 +261,7 @@ static int __init ls_pcie_probe(struct platform_device *pdev) if (!ls_pcie_is_bridge(pcie)) return -ENODEV; - ret = ls_add_pcie_port(&pcie->pp, pdev); + ret = ls_add_pcie_port(pcie, pdev); if (ret < 0) return ret; |