staging: vt6656: struct vnt_private merge flag and macros

merge u32 flag into unsigned long Flags

Replacing fMP_DISCONNECTED with DEVICE_FLAGS_DISCONNECTED

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Malcolm Priestley 2014-07-24 21:13:16 +01:00 committed by Greg Kroah-Hartman
parent 23e7c47dfc
commit 2746321ef4
4 changed files with 13 additions and 15 deletions

View file

@ -262,7 +262,8 @@ enum {
};
/* flags for options */
#define DEVICE_FLAGS_UNPLUG 0x00000001UL
#define DEVICE_FLAGS_UNPLUG BIT(0)
#define DEVICE_FLAGS_DISCONNECTED BIT(1)
struct vnt_private {
/* mac80211 */
@ -281,8 +282,7 @@ struct vnt_private {
spinlock_t lock;
struct mutex usb_lock;
u32 flags;
unsigned long Flags;
unsigned long flags;
/* USB */
struct urb *interrupt_urb;
@ -402,11 +402,9 @@ struct vnt_private {
(uVar)++; \
}
#define fMP_DISCONNECTED 0x00000002
#define MP_SET_FLAG(_M, _F) ((_M)->Flags |= (_F))
#define MP_CLEAR_FLAG(_M, _F) ((_M)->Flags &= ~(_F))
#define MP_TEST_FLAGS(_M, _F) (((_M)->Flags & (_F)) == (_F))
#define MP_SET_FLAG(_M, _F) ((_M)->flags |= (_F))
#define MP_CLEAR_FLAG(_M, _F) ((_M)->flags &= ~(_F))
#define MP_TEST_FLAGS(_M, _F) (((_M)->flags & (_F)) == (_F))
int vnt_init(struct vnt_private *priv);

View file

@ -551,7 +551,7 @@ static int vnt_start(struct ieee80211_hw *hw)
return -ENOMEM;
}
MP_CLEAR_FLAG(priv, fMP_DISCONNECTED);
MP_CLEAR_FLAG(priv, DEVICE_FLAGS_DISCONNECTED);
if (device_init_registers(priv) == false) {
dev_dbg(&priv->usb->dev, " init register fail\n");
@ -596,7 +596,7 @@ static void vnt_stop(struct ieee80211_hw *hw)
ieee80211_stop_queues(hw);
MP_SET_FLAG(priv, fMP_DISCONNECTED);
MP_SET_FLAG(priv, DEVICE_FLAGS_DISCONNECTED);
cancel_delayed_work_sync(&priv->run_command_work);
@ -1025,7 +1025,7 @@ vt6656_probe(struct usb_interface *intf, const struct usb_device_id *id)
usb_device_reset(priv);
MP_CLEAR_FLAG(priv, fMP_DISCONNECTED);
MP_CLEAR_FLAG(priv, DEVICE_FLAGS_DISCONNECTED);
vnt_reset_command_timer(priv);
vnt_schedule_command(priv, WLAN_CMD_INIT_MAC80211);

View file

@ -52,7 +52,7 @@ int vnt_control_out(struct vnt_private *priv, u8 request, u16 value,
{
int status = 0;
if (priv->Flags & fMP_DISCONNECTED)
if (priv->flags & DEVICE_FLAGS_DISCONNECTED)
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 & fMP_DISCONNECTED)
if (priv->flags & DEVICE_FLAGS_DISCONNECTED)
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 & fMP_DISCONNECTED) {
if (priv->flags & DEVICE_FLAGS_DISCONNECTED) {
context->in_use = false;
return STATUS_RESOURCES;
}

View 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 & fMP_DISCONNECTED)
if (priv->flags & DEVICE_FLAGS_DISCONNECTED)
return;
if (priv->cmd_running != true)