Skip to content

Commit

Permalink
ath9k: Fix PCI shutdown sequence
Browse files Browse the repository at this point in the history
pci_release_region() has to be called after the device
has been disabled. Also remove a stray __init attribute.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Sujith authored and John W. Linville committed Feb 27, 2009
1 parent 8147f5d commit db0f41f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/ath9k/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit db0f41f

Please sign in to comment.