PCIe: portdrv: call pci_disable_device during remove
authorAlex Chiang <achiang@hp.com>
Sun, 8 Mar 2009 04:46:49 +0000 (21:46 -0700)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Fri, 20 Mar 2009 17:48:16 +0000 (10:48 -0700)
The PCIe port driver calls pci_enable_device when registering
ports, but never calls pci_disable_device during removal.

Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/pcie/portdrv_core.c

index 5a5bfe7cdf5f86bf17787346fbbd0f9a978dfdf5..e39982503863e4a1539d4f1f968a9dbf47bc3242 100644 (file)
@@ -473,6 +473,7 @@ void pcie_port_device_remove(struct pci_dev *dev)
        struct pcie_port_data *port_data = pci_get_drvdata(dev);
 
        device_for_each_child(&dev->dev, NULL, remove_iter);
+       pci_disable_device(dev);
 
        switch (port_data->port_irq_mode) {
        case PCIE_PORT_MSIX_MODE: