diff options
Diffstat (limited to 'drivers/pci/host/pci-host-common.c')
-rw-r--r-- | drivers/pci/host/pci-host-common.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/pci/host/pci-host-common.c b/drivers/pci/host/pci-host-common.c index 5c90d7be2184..2967466a8c3b 100644 --- a/drivers/pci/host/pci-host-common.c +++ b/drivers/pci/host/pci-host-common.c @@ -163,5 +163,19 @@ int pci_host_common_probe(struct platform_device *pdev, } pci_bus_add_devices(bus); + + platform_set_drvdata(pdev, 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; } |