ipw2x00: silence GCC warning for unused variable 'dev'
authorPaul Bolle <pebolle@tiscali.nl>
Fri, 21 Sep 2012 10:02:02 +0000 (12:02 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 24 Sep 2012 19:02:08 +0000 (15:02 -0400)
Building the libipw component without CONFIG_LIBIPW_DEBUG set triggers this GCC
warning:
    drivers/net/wireless/ipw2x00/libipw_wx.c:526:21: warning: unused variable 'dev' [-Wunused-variable]

The cause of this warning is that, without CONFIG_LIBIPW_DEBUG set,
LIBIPW_DEBUG_WX compiles away. Fix it by substituting ieee->dev for (its
equivalent) dev.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ipw2x00/libipw_wx.c

index 1571505b1a38ba4903f6664cb0a25ada4e9a6e04..54aba474443867f463714e117f14a605ba251803 100644 (file)
@@ -675,7 +675,7 @@ int libipw_wx_set_encodeext(struct libipw_device *ieee,
        }
       done:
        if (ieee->set_security)
-               ieee->set_security(ieee->dev, &sec);
+               ieee->set_security(dev, &sec);
 
        return ret;
 }