Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290306
b: refs/heads/master
c: e81fb55
h: refs/heads/master
v: v3
  • Loading branch information
Emmanuel Grumbach authored and Wey-Yi Guy committed Feb 2, 2012
1 parent 03acb48 commit c85ab5c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 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: 8747bb4936c137bb93b91afd70eedd65069d26cd
refs/heads/master: e81fb554cfe082dc59a707767c426cbd2e361033
4 changes: 1 addition & 3 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1780,9 +1780,7 @@ int iwl_probe(struct iwl_bus *bus, const struct iwl_trans_ops *trans_ops,
}

priv = hw->priv;
priv->shrd = &priv->_shrd;
bus->shrd = priv->shrd;
priv->shrd->bus = bus;
priv->shrd = bus->shrd;
priv->shrd->priv = priv;

priv->shrd->trans = trans_ops->alloc(priv->shrd);
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/wireless/iwlwifi/iwl-dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,6 @@ struct iwl_wipan_noa_data {
struct iwl_priv {

/*data shared among all the driver's layers */
struct iwl_shared _shrd;
struct iwl_shared *shrd;

/* ieee device used by generic ieee processing code */
Expand Down
10 changes: 10 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,18 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if (!bus) {
dev_printk(KERN_ERR, &pdev->dev,
"Couldn't allocate iwl_pci_bus");
return -ENOMEM;
}

bus->shrd = kzalloc(sizeof(*bus->shrd), GFP_KERNEL);
if (!bus->shrd) {
dev_printk(KERN_ERR, &pdev->dev,
"Couldn't allocate iwl_shared");
err = -ENOMEM;
goto out_no_pci;
}

bus->shrd->bus = bus;
pci_bus = IWL_BUS_GET_PCI_BUS(bus);
pci_bus->pci_dev = pdev;

Expand Down Expand Up @@ -472,6 +480,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
out_pci_disable_device:
pci_disable_device(pdev);
out_no_pci:
kfree(bus->shrd);
kfree(bus);
return err;
}
Expand All @@ -491,6 +500,7 @@ static void __devexit iwl_pci_remove(struct pci_dev *pdev)
pci_disable_device(pci_dev);
pci_set_drvdata(pci_dev, NULL);

kfree(bus->shrd);
kfree(bus);
}

Expand Down

0 comments on commit c85ab5c

Please sign in to comment.