From: Oliver Hartkopp Date: Sun, 25 Mar 2012 06:43:24 +0000 (+0200) Subject: iwlwifi: fix unused variable warning X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a855f7ee64fedbe831859d53b20650c2224afecc;p=openwrt%2Fstaging%2Fblogic.git iwlwifi: fix unused variable warning In the case of disabled CONFIG_IWLWIFI_DEBUGFS option the compiler complains about the unused variable 'img'. Fix this by moving the 'img' definition. Signed-off-by: Oliver Hartkopp Acked-by: Wey-Yi Guy Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/iwlwifi/iwl-mac80211.c b/drivers/net/wireless/iwlwifi/iwl-mac80211.c index 551db9eec884..f1c675a2a6f3 100644 --- a/drivers/net/wireless/iwlwifi/iwl-mac80211.c +++ b/drivers/net/wireless/iwlwifi/iwl-mac80211.c @@ -438,7 +438,6 @@ static int iwlagn_mac_resume(struct ieee80211_hw *hw) unsigned long flags; u32 base, status = 0xffffffff; int ret = -EIO; - const struct fw_img *img; IWL_DEBUG_MAC80211(priv, "enter\n"); mutex_lock(&priv->mutex); @@ -459,6 +458,8 @@ static int iwlagn_mac_resume(struct ieee80211_hw *hw) #ifdef CONFIG_IWLWIFI_DEBUGFS if (ret == 0) { + const struct fw_img *img; + img = &(priv->fw->img[IWL_UCODE_WOWLAN]); if (!priv->wowlan_sram) { priv->wowlan_sram =