summaryrefslogtreecommitdiff
path: root/drivers/staging/vt6656
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2014-07-24 21:13:16 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-24 15:09:59 -0700
commit2746321ef4779608e4c0696c41b442936959ef47 (patch)
tree56a513646cf9cbe421ba906969f4c52bd1d1d2c8 /drivers/staging/vt6656
parent23e7c47dfce777435a083d4152954df02b4c347d (diff)
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>
Diffstat (limited to 'drivers/staging/vt6656')
-rw-r--r--drivers/staging/vt6656/device.h14
-rw-r--r--drivers/staging/vt6656/main_usb.c6
-rw-r--r--drivers/staging/vt6656/usbpipe.c6
-rw-r--r--drivers/staging/vt6656/wcmd.c2
4 files changed, 13 insertions, 15 deletions
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index ac4c7485463d..fd7105ea1f66 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -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);
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 3cfbd31f94d1..87feba52d240 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -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);
diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c
index ab95a07ee15e..b2722b9ac906 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 & 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;
}
diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c
index e4a5e2bead70..e5330e3ce407 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 & fMP_DISCONNECTED)
+ if (priv->flags & DEVICE_FLAGS_DISCONNECTED)
return;
if (priv->cmd_running != true)