summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2015-10-26 19:31:40 +0100
committerBjørn Mork <bjorn@mork.no>2015-10-26 19:31:40 +0100
commit15d41e0ab47834339b8c153912518ee6b8f6f577 (patch)
tree1990ca68e5010bc9516cde161b7b46e942242f0d
parent08a137b7170514226e158c3336df7bddcde2f69b (diff)
mwlwifi: try pcim_enable_device()
Signed-off-by: Bjørn Mork <bjorn@mork.no>
-rw-r--r--main.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/main.c b/main.c
index 2a9a67d..3ff20da 100644
--- a/main.c
+++ b/main.c
@@ -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 = {