Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1674777

[PATCH] PCI: mediatek: change to use pci_scan_root_bus_bridge()

From Ryder Lee <ryder.lee@mediatek.com>
Newsgroups linux.kernel
Subject [PATCH] PCI: mediatek: change to use pci_scan_root_bus_bridge()
Date 2017-06-26 15:40 +0200
Message-ID <tWCpb-2Xw-3@gated-at.bofh.it> (permalink)
References <tWCpb-2Xw-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


This is a critical patch fixes Build bot failed:
> 	arm-allmodconfig
> ../drivers/pci/host/pcie-mediatek.c:485:8: error: implicit declaration of
function 'pci_register_host_bridge' [-Werror=implicit-function-declaration]

It uses the new registration methods pci_scan_root_bus_bridge().

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
---
 drivers/pci/host/pcie-mediatek.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/host/pcie-mediatek.c b/drivers/pci/host/pcie-mediatek.c
index 3baafa8..514ef34 100644
--- a/drivers/pci/host/pcie-mediatek.c
+++ b/drivers/pci/host/pcie-mediatek.c
@@ -482,12 +482,10 @@ static int mtk_pcie_register_host(struct pci_host_bridge *host)
 	host->dev.parent = pcie->dev;
 	host->ops = &mtk_pcie_ops;
 
-	err = pci_register_host_bridge(host);
+	err = pci_scan_root_bus_bridge(host);
 	if (err < 0)
 		return err;
 
-	pci_scan_child_bus(host->bus);
-
 	pci_fixup_irqs(pci_common_swizzle, of_irq_parse_and_map_pci);
 	pci_bus_size_bridges(host->bus);
 	pci_bus_assign_resources(host->bus);
@@ -506,7 +504,7 @@ static int mtk_pcie_probe(struct platform_device *pdev)
 	struct pci_host_bridge *host;
 	int err;
 
-	host = pci_alloc_host_bridge(sizeof(*pcie));
+	host = devm_pci_alloc_host_bridge(&pdev->dev, sizeof(*pcie));
 	if (!host)
 		return -ENOMEM;
 
-- 
1.9.1

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH] PCI: mediatek: change to use pci_scan_root_bus_bridge() Ryder Lee <ryder.lee@mediatek.com> - 2017-06-26 15:40 +0200

csiph-web