diff options
author | Assaf Krauss <assaf.krauss@intel.com> | 2008-03-14 13:38:48 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-03-25 16:41:51 -0400 |
commit | 1d0a082d38decb62ceb3e26a4bb1a3ca78843a23 (patch) | |
tree | 4563baeb92331e953803a151f84abbdaac204481 /drivers/net/wireless/iwlwifi/iwl4965-base.c | |
parent | 00acbc91354f7c548ce12a9ebb7fd25c4c3861ae (diff) |
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.c | 13 |
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 | |||
8531 | iwl4965_hw_ops.hw_scan = NULL; | 8531 | iwl4965_hw_ops.hw_scan = NULL; |
8532 | } | 8532 | } |
8533 | 8533 | ||
8534 | /* mac80211 allocates memory for this device instance, including | 8534 | hw = iwl_alloc_all(cfg, &iwl4965_hw_ops); |
8535 | * space for this driver's private structure */ | 8535 | if (!hw) { |
8536 | hw = ieee80211_alloc_hw(sizeof(struct iwl_priv), &iwl4965_hw_ops); | ||
8537 | if (hw == NULL) { | ||
8538 | IWL_ERROR("Can not allocate network device\n"); | ||
8539 | err = -ENOMEM; | 8536 | err = -ENOMEM; |
8540 | goto out; | 8537 | goto out; |
8541 | } | 8538 | } |
8539 | priv = hw->priv; | ||
8540 | /* At this point both hw and priv are allocated. */ | ||
8541 | |||
8542 | SET_IEEE80211_DEV(hw, &pdev->dev); | 8542 | SET_IEEE80211_DEV(hw, &pdev->dev); |
8543 | 8543 | ||
8544 | IWL_DEBUG_INFO("*** LOAD DRIVER ***\n"); | 8544 | IWL_DEBUG_INFO("*** LOAD DRIVER ***\n"); |
8545 | priv = hw->priv; | ||
8546 | priv->hw = hw; | ||
8547 | priv->cfg = cfg; | 8545 | priv->cfg = cfg; |
8548 | |||
8549 | priv->pci_dev = pdev; | 8546 | priv->pci_dev = pdev; |
8550 | 8547 | ||
8551 | #ifdef CONFIG_IWLWIFI_DEBUG | 8548 | #ifdef CONFIG_IWLWIFI_DEBUG |