Skip to contentSkip to conversation

ath9k: Fix PCI shutdown sequence

PATCH New Sujith 1 participant 1 message Feb 20, 2009 Networking drivers (wireless)

lore
Share & tools
lore

Sujith

author
#0 lore raw

PATCH 4/5 ath9k: Fix PCI shutdown sequence

pci_release_region() has to be called after the device has been disabled. Also remove a stray __init attribute.

---
 drivers/net/wireless/ath9k/pci.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/ath9k/pci.c +2 -2
index a70f954..eea9d3a 100644
@@ -52,8 +52,8 @@ static void ath_pci_cleanup(struct ath_softc *sc)
 	struct pci_dev *pdev = to_pci_dev(sc->dev);
 
 	pci_iounmap(pdev, sc->mem);
-	pci_release_region(pdev, 0);
 	pci_disable_device(pdev);
+	pci_release_region(pdev, 0);
 }
 
 static bool ath_pci_eeprom_read(struct ath_hw *ah, u32 off, u16 *data)
@@ -293,7 +293,7 @@ static struct pci_driver ath_pci_driver = {
 #endif /* CONFIG_PM */
 };
 
-int __init ath_pci_init(void)
+int ath_pci_init(void)
 {
 	return pci_register_driver(&ath_pci_driver);
 }
Signature · 1 line
1.6.1