]> xenbits.xensource.com Git - people/aperard/linux-chromebook.git/commitdiff
BACKPORT: iwlwifi: fix unused variable warning
authorOliver Hartkopp <socketcan@hartkopp.net>
Sun, 25 Mar 2012 06:43:24 +0000 (08:43 +0200)
committerChromeBot <chrome-bot@google.com>
Thu, 17 Jan 2013 20:01:02 +0000 (12:01 -0800)
In the case of disabled CONFIG_IWLWIFI_DEBUGFS option the compiler complains
about the unused variable 'img'. Fix this by moving the 'img' definition.

Taken from kernel-next commit a855f7ee64fedbe831859d53b20650c2224afecc

BUG=chromium-os:5542
TEST=emerge chromeos-kernel, make sure no warnings in iwl-mac80211.o

Change-Id: I34bcd89a9d96a5baecf064c39ee34bc6e25c9c92
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41487
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
drivers/net/wireless/iwlwifi/iwl-mac80211.c

index c24a7134a6f9a3729d81350ea699246744805884..095f4120754f5472e50d485897a2080a5b646901 100644 (file)
@@ -437,7 +437,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);
@@ -458,6 +457,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 =