staging: vt6656: use test_bit to check flags status
authorMalcolm Priestley <tvboxspy@gmail.com>
Thu, 24 Jul 2014 20:13:20 +0000 (21:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 24 Jul 2014 22:09:59 +0000 (15:09 -0700)
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/main_usb.c
drivers/staging/vt6656/usbpipe.c
drivers/staging/vt6656/wcmd.c

index d729d949ce27a79103827084822f1d8afd89a8df..fdc5c7bc419af20fa257500fa06f4477fc891d8d 100644 (file)
@@ -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);
index b2722b9ac9061ea28557c4e6fd4c175b0ce87086..f1969fea7f5c03391bc36d03f29a4b0ca2bb31c5 100644 (file)
@@ -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;
        }
index e5330e3ce4079c7c0084eaa7b518b72dccb156b5..8f6417bcaed242790b962bf471a78468a0b3dd88 100644 (file)
@@ -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)