Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263534
b: refs/heads/master
c: 4475a0a
h: refs/heads/master
v: v3
  • Loading branch information
John W. Linville committed Aug 22, 2011
1 parent 463267f commit 1cf3e0b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 687beaa0d1d937c327e2f97b4b4fa6c23ca70624
refs/heads/master: 4475a0a93f368e57d5306d4cbe9318e8c1c90c41
25 changes: 10 additions & 15 deletions trunk/drivers/net/wireless/iwlwifi/iwl-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,27 +478,22 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
return err;
}

static void iwl_pci_down(struct iwl_bus *bus)
{
struct iwl_pci_bus *pci_bus = (struct iwl_pci_bus *) bus->bus_specific;

pci_disable_msi(pci_bus->pci_dev);
pci_iounmap(pci_bus->pci_dev, pci_bus->hw_base);
pci_release_regions(pci_bus->pci_dev);
pci_disable_device(pci_bus->pci_dev);
pci_set_drvdata(pci_bus->pci_dev, NULL);

kfree(bus);
}

static void __devexit iwl_pci_remove(struct pci_dev *pdev)
{
struct iwl_priv *priv = pci_get_drvdata(pdev);
void *bus_specific = priv->bus->bus_specific;
struct iwl_bus *bus = priv->bus;
struct iwl_pci_bus *pci_bus = IWL_BUS_GET_PCI_BUS(bus);
struct pci_dev *pci_dev = IWL_BUS_GET_PCI_DEV(bus);

iwl_remove(priv);

iwl_pci_down(bus_specific);
pci_disable_msi(pci_dev);
pci_iounmap(pci_dev, pci_bus->hw_base);
pci_release_regions(pci_dev);
pci_disable_device(pci_dev);
pci_set_drvdata(pci_dev, NULL);

kfree(bus);
}

#ifdef CONFIG_PM
Expand Down
6 changes: 1 addition & 5 deletions trunk/drivers/net/wireless/wl12xx/acx.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ int wl1271_acx_sleep_auth(struct wl1271 *wl, u8 sleep_auth)
auth->sleep_auth = sleep_auth;

ret = wl1271_cmd_configure(wl, ACX_SLEEP_AUTH, auth, sizeof(*auth));
if (ret < 0)
return ret;

out:
kfree(auth);
Expand Down Expand Up @@ -624,10 +622,8 @@ int wl1271_acx_cca_threshold(struct wl1271 *wl)

ret = wl1271_cmd_configure(wl, ACX_CCA_THRESHOLD,
detection, sizeof(*detection));
if (ret < 0) {
if (ret < 0)
wl1271_warning("failed to set cca threshold: %d", ret);
return ret;
}

out:
kfree(detection);
Expand Down
5 changes: 4 additions & 1 deletion trunk/drivers/net/wireless/wl12xx/testmode.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,15 @@ static int wl1271_tm_cmd_interrogate(struct wl1271 *wl, struct nlattr *tb[])

if (ret < 0) {
wl1271_warning("testmode cmd interrogate failed: %d", ret);
kfree(cmd);
return ret;
}

skb = cfg80211_testmode_alloc_reply_skb(wl->hw->wiphy, sizeof(*cmd));
if (!skb)
if (!skb) {
kfree(cmd);
return -ENOMEM;
}

NLA_PUT(skb, WL1271_TM_ATTR_DATA, sizeof(*cmd), cmd);

Expand Down

0 comments on commit 1cf3e0b

Please sign in to comment.