Commit 7b0b1113 authored by Bjorn Helgaas's avatar Bjorn Helgaas

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: default avatarBjorn Helgaas <bhelgaas@google.com>
parent d41d2959
...@@ -213,12 +213,12 @@ static const struct of_device_id ls_pcie_of_match[] = { ...@@ -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 platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct pcie_port *pp = &pcie->pp;
int ret; int ret;
struct ls_pcie *pcie = to_ls_pcie(pp);
pp->dev = dev; pp->dev = dev;
pp->ops = pcie->drvdata->ops; pp->ops = pcie->drvdata->ops;
...@@ -261,7 +261,7 @@ static int __init ls_pcie_probe(struct platform_device *pdev) ...@@ -261,7 +261,7 @@ static int __init ls_pcie_probe(struct platform_device *pdev)
if (!ls_pcie_is_bridge(pcie)) if (!ls_pcie_is_bridge(pcie))
return -ENODEV; return -ENODEV;
ret = ls_add_pcie_port(&pcie->pp, pdev); ret = ls_add_pcie_port(pcie, pdev);
if (ret < 0) if (ret < 0)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment