[patch 54/96] PCIe: portdrv: call pci_disable_device during remove

Greg KH
2009-03-14T00:37:37Z

[-- Attachment #1: pcie-portdrv-call-pci_disable_device-during-remove.patch --]
[-- Type: text/plain, Size: 826 bytes --]

2.6.27-stable review patch. If anyone has any objections, please let us know.

------------------

From: Alex Chiang <achiang@hp.com>

commit d89987193631bf23d1735c55d13a06d4b8d0e9bd upstream.

The PCIe port driver calls pci_enable_device() during probe but
never calls pci_disable_device() during remove.

Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
drivers/pci/pcie/portdrv_pci.c | 1 +
1 file changed, 1 insertion(+)

--- a/drivers/pci/pcie/portdrv_pci.c
+++ b/drivers/pci/pcie/portdrv_pci.c
@@ -115,6 +115,7 @@ static int __devinit pcie_portdrv_probe
static void pcie_portdrv_remove (struct pci_dev *dev)
{
pcie_port_device_remove(dev);
+ pci_disable_device(dev);
kfree(pci_get_drvdata(dev));
}