Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=777ec5e9cec521af617fc52a1c1ae24f68f4a43b
Commit:     777ec5e9cec521af617fc52a1c1ae24f68f4a43b
Parent:     a62056f0b0cfdc175afd99fef80a68f01cdf0f4b
Author:     Michal Schmidt <[EMAIL PROTECTED]>
AuthorDate: Fri Jun 29 15:33:30 2007 +0200
Committer:  John W. Linville <[EMAIL PROTECTED]>
CommitDate: Tue Jul 10 14:11:28 2007 -0400

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
---
 drivers/net/wireless/airo.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 2d3a180..57da70b 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,
                        dev = _init_airo_card(pdev->irq, 
pdev->resource[0].start, 0, pdev, &pdev->dev);
        else
                        dev = _init_airo_card(pdev->irq, 
pdev->resource[2].start, 0, pdev, &pdev->dev);
-       if (!dev)
+       if (!dev) {
+               pci_disable_device(pdev);
                return -ENODEV;
+       }
 
        pci_set_drvdata(pdev, dev);
        return 0;
@@ -5610,6 +5612,8 @@ static void __devexit airo_pci_remove(struct pci_dev 
*pdev)
 
        airo_print_info(dev->name, "Unregistering...");
        stop_airo_card(dev, 1);
+       pci_disable_device(pdev);
+       pci_set_drvdata(pdev, NULL);
 }
 
 static int airo_pci_suspend(struct pci_dev *pdev, pm_message_t state)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to