summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl4965-base.c
diff options
context:
space:
mode:
authorAssaf Krauss2008-03-14 18:38:48 +0100
committerJohn W. Linville2008-03-25 21:41:51 +0100
commit1d0a082d38decb62ceb3e26a4bb1a3ca78843a23 (patch)
tree4563baeb92331e953803a151f84abbdaac204481 /drivers/net/wireless/iwlwifi/iwl4965-base.c
parentiwlwifi: Packing all 4965 parameters (diff)
downloadkernel-qcow2-linux-1d0a082d38decb62ceb3e26a4bb1a3ca78843a23.tar.gz
kernel-qcow2-linux-1d0a082d38decb62ceb3e26a4bb1a3ca78843a23.tar.xz
kernel-qcow2-linux-1d0a082d38decb62ceb3e26a4bb1a3ca78843a23.zip
iwlwifi: Probe Flow - Performing allocation in a separate function
Performing allocation in a separate function (previously handled in 'probe') Signed-off-by: Assaf Krauss <assaf.krauss@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl4965-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index 465918cf77f1..a8fa1bfa570b 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -8531,21 +8531,18 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
iwl4965_hw_ops.hw_scan = NULL;
}
- /* mac80211 allocates memory for this device instance, including
- * space for this driver's private structure */
- hw = ieee80211_alloc_hw(sizeof(struct iwl_priv), &iwl4965_hw_ops);
- if (hw == NULL) {
- IWL_ERROR("Can not allocate network device\n");
+ hw = iwl_alloc_all(cfg, &iwl4965_hw_ops);
+ if (!hw) {
err = -ENOMEM;
goto out;
}
+ priv = hw->priv;
+ /* At this point both hw and priv are allocated. */
+
SET_IEEE80211_DEV(hw, &pdev->dev);
IWL_DEBUG_INFO("*** LOAD DRIVER ***\n");
- priv = hw->priv;
- priv->hw = hw;
priv->cfg = cfg;
-
priv->pci_dev = pdev;
#ifdef CONFIG_IWLWIFI_DEBUG