diff options
author | Minghuan Lian <Minghuan.Lian@freescale.com> | 2015-10-16 15:19:18 +0800 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2015-11-02 15:38:39 -0600 |
commit | a167fb73be98f43f16116a2c3a0cd9ad11c8ef61 (patch) | |
tree | 39bab7b4eb0dfd11321ae98f3c06459140dae192 /drivers/pci/host/pci-layerscape.c | |
parent | d64633453e3b3e580111ecca566d9e2771dad694 (diff) | |
download | op-kernel-dev-a167fb73be98f43f16116a2c3a0cd9ad11c8ef61.zip op-kernel-dev-a167fb73be98f43f16116a2c3a0cd9ad11c8ef61.tar.gz |
PCI: layerscape: Update ls_add_pcie_port()
Update the ls_add_pcie_port() signature to keep it consistent with the
other DesignWare-based host drivers.
Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/host/pci-layerscape.c')
-rw-r--r-- | drivers/pci/host/pci-layerscape.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/pci/host/pci-layerscape.c b/drivers/pci/host/pci-layerscape.c index 89b7eb8..f778f63 100644 --- a/drivers/pci/host/pci-layerscape.c +++ b/drivers/pci/host/pci-layerscape.c @@ -125,15 +125,14 @@ static const struct of_device_id ls_pcie_of_match[] = { }; MODULE_DEVICE_TABLE(of, ls_pcie_of_match); -static int ls_add_pcie_port(struct ls_pcie *pcie) +static int __init ls_add_pcie_port(struct pcie_port *pp, + struct platform_device *pdev) { - struct pcie_port *pp; int ret; + struct ls_pcie *pcie = to_ls_pcie(pp); - pp = &pcie->pp; - pp->dev = pcie->dev; + pp->dev = &pdev->dev; pp->dbi_base = pcie->dbi; - pp->root_bus_nr = -1; pp->ops = pcie->drvdata->ops; ret = dw_pcie_host_init(pp); @@ -160,8 +159,6 @@ static int __init ls_pcie_probe(struct platform_device *pdev) if (!pcie) return -ENOMEM; - pcie->dev = &pdev->dev; - dbi_base = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); pcie->dbi = devm_ioremap_resource(&pdev->dev, dbi_base); if (IS_ERR(pcie->dbi)) { @@ -174,7 +171,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); + ret = ls_add_pcie_port(&pcie->pp, pdev); if (ret < 0) return ret; |