The variable 'dev' is only used by a macro LIBIPW_DEBUG_WX() that is
conditional upon the config option 'CONFIG_LIBIPW_DEBUG'. When this
config option isn't defined, we get this warning:
libipw_wx.c:526:21: error: unused variable 'dev'
The solution is to define 'dev' only if CONFIG_LIBIPW_DEBUG is defined.
BUG=chromium-os:5542
TEST=emerge-x86-generic chromeos-kernel, make sure warning doesn't
appear.
Change-Id: I537c361f363879971ca045687e3dbd98475925fc
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42357
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
+#ifdef CONFIG_LIBIPW_DEBUG
struct net_device *dev = ieee->dev;
+#endif
struct iw_point *encoding = &wrqu->encoding;
struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
int i, idx, ret = 0;