aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2007-06-29 09:33:30 -0400
committerJohn W. Linville <linville@tuxdriver.com>2007-07-10 14:11:28 -0400
commit777ec5e9cec521af617fc52a1c1ae24f68f4a43b (patch)
tree19f32c96204f5ff1ff60b28b6355519e87acc2f7 /drivers/net/wireless
parenta62056f0b0cfdc175afd99fef80a68f01cdf0f4b (diff)
[PATCH] airo: disable the PCI device when unloading module
Fix an assymetry between pci_{enable,disable}_device. airo did not disable the PCI device when unloading the module. This caused suspend failures after modprobe -r airo && modprobe airo. Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/airo.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 2d3a180dada..57da70b07f1 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -5597,8 +5597,10 @@ static int __devinit airo_pci_probe(struct pci_dev *pdev,
5597 dev = _init_airo_card(pdev->irq, pdev->resource[0].start, 0, pdev, &pdev->dev); 5597 dev = _init_airo_card(pdev->irq, pdev->resource[0].start, 0, pdev, &pdev->dev);
5598 else 5598 else
5599 dev = _init_airo_card(pdev->irq, pdev->resource[2].start, 0, pdev, &pdev->dev); 5599 dev = _init_airo_card(pdev->irq, pdev->resource[2].start, 0, pdev, &pdev->dev);
5600 if (!dev) 5600 if (!dev) {
5601 pci_disable_device(pdev);
5601 return -ENODEV; 5602 return -ENODEV;
5603 }
5602 5604
5603 pci_set_drvdata(pdev, dev); 5605 pci_set_drvdata(pdev, dev);
5604 return 0; 5606 return 0;
@@ -5610,6 +5612,8 @@ static void __devexit airo_pci_remove(struct pci_dev *pdev)
5610 5612
5611 airo_print_info(dev->name, "Unregistering..."); 5613 airo_print_info(dev->name, "Unregistering...");
5612 stop_airo_card(dev, 1); 5614 stop_airo_card(dev, 1);
5615 pci_disable_device(pdev);
5616 pci_set_drvdata(pdev, NULL);
5613} 5617}
5614 5618
5615static int airo_pci_suspend(struct pci_dev *pdev, pm_message_t state) 5619static int airo_pci_suspend(struct pci_dev *pdev, pm_message_t state)