Commit cbcc9a36 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6656: use test_bit to check flags status

Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fa4b5c74
...@@ -591,7 +591,7 @@ static void vnt_stop(struct ieee80211_hw *hw) ...@@ -591,7 +591,7 @@ static void vnt_stop(struct ieee80211_hw *hw)
/* clear all keys */ /* clear all keys */
priv->key_entry_inuse = 0; priv->key_entry_inuse = 0;
if ((priv->flags & DEVICE_FLAGS_UNPLUG) == false) if (!test_bit(DEVICE_FLAGS_UNPLUG, &priv->flags))
vnt_mac_shutdown(priv); vnt_mac_shutdown(priv);
ieee80211_stop_queues(hw); ieee80211_stop_queues(hw);
......
...@@ -52,7 +52,7 @@ int vnt_control_out(struct vnt_private *priv, u8 request, u16 value, ...@@ -52,7 +52,7 @@ int vnt_control_out(struct vnt_private *priv, u8 request, u16 value,
{ {
int status = 0; int status = 0;
if (priv->flags & DEVICE_FLAGS_DISCONNECTED) if (test_bit(DEVICE_FLAGS_DISCONNECTED, &priv->flags))
return STATUS_FAILURE; return STATUS_FAILURE;
mutex_lock(&priv->usb_lock); mutex_lock(&priv->usb_lock);
...@@ -80,7 +80,7 @@ int vnt_control_in(struct vnt_private *priv, u8 request, u16 value, ...@@ -80,7 +80,7 @@ int vnt_control_in(struct vnt_private *priv, u8 request, u16 value,
{ {
int status; int status;
if (priv->flags & DEVICE_FLAGS_DISCONNECTED) if (test_bit(DEVICE_FLAGS_DISCONNECTED, &priv->flags))
return STATUS_FAILURE; return STATUS_FAILURE;
mutex_lock(&priv->usb_lock); mutex_lock(&priv->usb_lock);
...@@ -289,7 +289,7 @@ int vnt_tx_context(struct vnt_private *priv, ...@@ -289,7 +289,7 @@ int vnt_tx_context(struct vnt_private *priv,
int status; int status;
struct urb *urb; struct urb *urb;
if (priv->flags & DEVICE_FLAGS_DISCONNECTED) { if (test_bit(DEVICE_FLAGS_DISCONNECTED, &priv->flags)) {
context->in_use = false; context->in_use = false;
return STATUS_RESOURCES; return STATUS_RESOURCES;
} }
......
...@@ -97,7 +97,7 @@ void vnt_run_command(struct work_struct *work) ...@@ -97,7 +97,7 @@ void vnt_run_command(struct work_struct *work)
struct vnt_private *priv = struct vnt_private *priv =
container_of(work, struct vnt_private, run_command_work.work); 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; return;
if (priv->cmd_running != true) if (priv->cmd_running != true)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment