diff options
author | Honghui Zhang <honghui.zhang@mediatek.com> | 2017-08-14 21:04:27 +0800 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-08-30 08:23:58 -0500 |
commit | db271747a04da5190b81ad120ee48c88d652b0e7 (patch) | |
tree | 793edca683d05da7de70b01bb8e4c87b8e30fc14 /drivers/pci/host/pcie-mediatek.c | |
parent | c2e0ba9caf6ca81f8800ed2ebcf1bfdfd70ea81b (diff) | |
download | linux-stable-db271747a04da5190b81ad120ee48c88d652b0e7.tar.gz linux-stable-db271747a04da5190b81ad120ee48c88d652b0e7.tar.bz2 linux-stable-db271747a04da5190b81ad120ee48c88d652b0e7.zip |
PCI: mediatek: Use bus->sysdata to get host private data
75983c6d1f38 ("PCI: mediatek: Add controller support for MT2712 and
MT7622") has put the mtk_pcie * into bus->sysdata. Take advantage of that
to get the private data and simplify the code.
Signed-off-by: Honghui Zhang <honghui.zhang@mediatek.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Ryder Lee <ryder.lee@mediatek.com>
Diffstat (limited to 'drivers/pci/host/pcie-mediatek.c')
-rw-r--r-- | drivers/pci/host/pcie-mediatek.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pci/host/pcie-mediatek.c b/drivers/pci/host/pcie-mediatek.c index 946c056439e5..acc2e289cbe3 100644 --- a/drivers/pci/host/pcie-mediatek.c +++ b/drivers/pci/host/pcie-mediatek.c @@ -511,8 +511,7 @@ static int mtk_pcie_setup_irq(struct mtk_pcie_port *port, static void __iomem *mtk_pcie_map_bus(struct pci_bus *bus, unsigned int devfn, int where) { - struct pci_host_bridge *host = pci_find_host_bridge(bus); - struct mtk_pcie *pcie = pci_host_bridge_priv(host); + struct mtk_pcie *pcie = bus->sysdata; writel(PCIE_CONF_ADDR(where, PCI_FUNC(devfn), PCI_SLOT(devfn), bus->number), pcie->base + PCIE_CFG_ADDR); |