diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-pci.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-pci.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-pci.c b/drivers/net/wireless/iwlwifi/iwl-pci.c index 69d4ec467dca..2fdbffa079c1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-pci.c +++ b/drivers/net/wireless/iwlwifi/iwl-pci.c | |||
@@ -478,27 +478,22 @@ out_no_pci: | |||
478 | return err; | 478 | return err; |
479 | } | 479 | } |
480 | 480 | ||
481 | static void iwl_pci_down(struct iwl_bus *bus) | ||
482 | { | ||
483 | struct iwl_pci_bus *pci_bus = (struct iwl_pci_bus *) bus->bus_specific; | ||
484 | |||
485 | pci_disable_msi(pci_bus->pci_dev); | ||
486 | pci_iounmap(pci_bus->pci_dev, pci_bus->hw_base); | ||
487 | pci_release_regions(pci_bus->pci_dev); | ||
488 | pci_disable_device(pci_bus->pci_dev); | ||
489 | pci_set_drvdata(pci_bus->pci_dev, NULL); | ||
490 | |||
491 | kfree(bus); | ||
492 | } | ||
493 | |||
494 | static void __devexit iwl_pci_remove(struct pci_dev *pdev) | 481 | static void __devexit iwl_pci_remove(struct pci_dev *pdev) |
495 | { | 482 | { |
496 | struct iwl_priv *priv = pci_get_drvdata(pdev); | 483 | struct iwl_priv *priv = pci_get_drvdata(pdev); |
497 | void *bus_specific = priv->bus->bus_specific; | 484 | struct iwl_bus *bus = priv->bus; |
485 | struct iwl_pci_bus *pci_bus = IWL_BUS_GET_PCI_BUS(bus); | ||
486 | struct pci_dev *pci_dev = IWL_BUS_GET_PCI_DEV(bus); | ||
498 | 487 | ||
499 | iwl_remove(priv); | 488 | iwl_remove(priv); |
500 | 489 | ||
501 | iwl_pci_down(bus_specific); | 490 | pci_disable_msi(pci_dev); |
491 | pci_iounmap(pci_dev, pci_bus->hw_base); | ||
492 | pci_release_regions(pci_dev); | ||
493 | pci_disable_device(pci_dev); | ||
494 | pci_set_drvdata(pci_dev, NULL); | ||
495 | |||
496 | kfree(bus); | ||
502 | } | 497 | } |
503 | 498 | ||
504 | #ifdef CONFIG_PM | 499 | #ifdef CONFIG_PM |