diff options
-rw-r--r-- | main.c | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -679,7 +679,7 @@ static int mwl_probe(struct pci_dev *pdev, const struct pci_device_id *id) printed_version = true; } - rc = pci_enable_device(pdev); + rc = pcim_enable_device(pdev); if (rc) { pr_err("%s: cannot enable new PCI device", MWL_DRV_NAME); @@ -777,7 +777,6 @@ err_alloc_pci_resource: err_pci_disable_device: - pci_disable_device(pdev); return rc; } @@ -785,20 +784,15 @@ err_pci_disable_device: static void mwl_remove(struct pci_dev *pdev) { struct ieee80211_hw *hw = pci_get_drvdata(pdev); - struct mwl_priv *priv; if (!hw) return; - priv = hw->priv; - - mwl_wl_deinit(priv); + mwl_wl_deinit(hw->priv); #ifdef CONFIG_DEBUG_FS mwl_debugfs_remove(hw); #endif ieee80211_free_hw(hw); - pci_set_drvdata(pdev, NULL); - pci_disable_device(pdev); } static struct pci_driver mwl_pci_driver = { |