From: Malcolm Priestley Date: Thu, 24 Jul 2014 20:13:20 +0000 (+0100) Subject: staging: vt6656: use test_bit to check flags status X-Git-Tag: v3.17-rc1~123^2~287 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=cbcc9a365a8a5a673f4b15bfcc4e1b18b9f69db4;p=karo-tx-linux.git staging: vt6656: use test_bit to check flags status Signed-off-by: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index d729d949ce27..fdc5c7bc419a 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -591,7 +591,7 @@ static void vnt_stop(struct ieee80211_hw *hw) /* clear all keys */ priv->key_entry_inuse = 0; - if ((priv->flags & DEVICE_FLAGS_UNPLUG) == false) + if (!test_bit(DEVICE_FLAGS_UNPLUG, &priv->flags)) vnt_mac_shutdown(priv); ieee80211_stop_queues(hw); diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c index b2722b9ac906..f1969fea7f5c 100644 --- a/drivers/staging/vt6656/usbpipe.c +++ b/drivers/staging/vt6656/usbpipe.c @@ -52,7 +52,7 @@ int vnt_control_out(struct vnt_private *priv, u8 request, u16 value, { int status = 0; - if (priv->flags & DEVICE_FLAGS_DISCONNECTED) + if (test_bit(DEVICE_FLAGS_DISCONNECTED, &priv->flags)) return STATUS_FAILURE; mutex_lock(&priv->usb_lock); @@ -80,7 +80,7 @@ int vnt_control_in(struct vnt_private *priv, u8 request, u16 value, { int status; - if (priv->flags & DEVICE_FLAGS_DISCONNECTED) + if (test_bit(DEVICE_FLAGS_DISCONNECTED, &priv->flags)) return STATUS_FAILURE; mutex_lock(&priv->usb_lock); @@ -289,7 +289,7 @@ int vnt_tx_context(struct vnt_private *priv, int status; struct urb *urb; - if (priv->flags & DEVICE_FLAGS_DISCONNECTED) { + if (test_bit(DEVICE_FLAGS_DISCONNECTED, &priv->flags)) { context->in_use = false; return STATUS_RESOURCES; } diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c index e5330e3ce407..8f6417bcaed2 100644 --- a/drivers/staging/vt6656/wcmd.c +++ b/drivers/staging/vt6656/wcmd.c @@ -97,7 +97,7 @@ void vnt_run_command(struct work_struct *work) struct vnt_private *priv = container_of(work, struct vnt_private, run_command_work.work); - if (priv->flags & DEVICE_FLAGS_DISCONNECTED) + if (test_bit(DEVICE_FLAGS_DISCONNECTED, &priv->flags)) return; if (priv->cmd_running != true)