summaryrefslogtreecommitdiffstats
path: root/drivers/pci/host/pci-host-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/host/pci-host-common.c')
-rw-r--r--drivers/pci/host/pci-host-common.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/pci/host/pci-host-common.c b/drivers/pci/host/pci-host-common.c
index 5d028f53fdcdb..d8f10451f2730 100644
--- a/drivers/pci/host/pci-host-common.c
+++ b/drivers/pci/host/pci-host-common.c
@@ -101,5 +101,18 @@ int pci_host_common_probe(struct platform_device *pdev,
return ret;
}
+ platform_set_drvdata(pdev, bridge->bus);
+ return 0;
+}
+
+int pci_host_common_remove(struct platform_device *pdev)
+{
+ struct pci_bus *bus = platform_get_drvdata(pdev);
+
+ pci_lock_rescan_remove();
+ pci_stop_root_bus(bus);
+ pci_remove_root_bus(bus);
+ pci_unlock_rescan_remove();
+
return 0;
}