summaryrefslogtreecommitdiff
path: root/drivers/staging/vt6656
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2020-03-04 19:41:55 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-10 10:51:20 +0100
commitd1ec124246181b63e5a0dae54b5638f6c4cab4c5 (patch)
tree37a8a80dec1a8ee384dc28f824aa3fbfce377ffc /drivers/staging/vt6656
parentb26b1391dfa54a63abddd3dd6a18fc934826a01d (diff)
staging: vt6656: Remove vnt_interrupt_buffer in_use flag.
mac80211 is the only user of in_use to start it and should not be true when so. So internal toggling of this variable is not relevant. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/69585034-4318-4bec-7d9b-f64a167df237@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6656')
-rw-r--r--drivers/staging/vt6656/device.h1
-rw-r--r--drivers/staging/vt6656/usbpipe.c28
2 files changed, 3 insertions, 26 deletions
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 5c9991415432..e94df4685b25 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -253,7 +253,6 @@ struct vnt_usb_send_context {
*/
struct vnt_interrupt_buffer {
u8 *data_buf;
- bool in_use;
};
/* flags for options */
diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c
index b9e79755e7fa..fd2c9d9d6eb4 100644
--- a/drivers/staging/vt6656/usbpipe.c
+++ b/drivers/staging/vt6656/usbpipe.c
@@ -221,8 +221,6 @@ static void vnt_int_process_data(struct vnt_private *priv)
low_stats->dot11ACKFailureCount += int_data->ack_fail;
low_stats->dot11FCSErrorCount += int_data->fcs_err;
}
-
- priv->int_buf.in_use = false;
}
static void vnt_start_interrupt_urb_complete(struct urb *urb)
@@ -237,25 +235,19 @@ static void vnt_start_interrupt_urb_complete(struct urb *urb)
case -ECONNRESET:
case -ENOENT:
case -ESHUTDOWN:
- priv->int_buf.in_use = false;
return;
default:
break;
}
- if (status) {
- priv->int_buf.in_use = false;
-
+ if (status)
dev_dbg(&priv->usb->dev, "%s status = %d\n", __func__, status);
- } else {
+ else
vnt_int_process_data(priv);
- }
status = usb_submit_urb(priv->interrupt_urb, GFP_ATOMIC);
if (status)
dev_dbg(&priv->usb->dev, "Submit int URB failed %d\n", status);
- else
- priv->int_buf.in_use = true;
}
int vnt_start_interrupt_urb(struct vnt_private *priv)
@@ -264,13 +256,6 @@ int vnt_start_interrupt_urb(struct vnt_private *priv)
dev_dbg(&priv->usb->dev, "---->Interrupt Polling Thread\n");
- if (priv->int_buf.in_use) {
- ret = -EBUSY;
- goto err;
- }
-
- priv->int_buf.in_use = true;
-
usb_fill_int_urb(priv->interrupt_urb,
priv->usb,
usb_rcvintpipe(priv->usb, 1),
@@ -281,16 +266,9 @@ int vnt_start_interrupt_urb(struct vnt_private *priv)
priv->int_interval);
ret = usb_submit_urb(priv->interrupt_urb, GFP_ATOMIC);
- if (ret) {
+ if (ret)
dev_dbg(&priv->usb->dev, "Submit int URB failed %d\n", ret);
- goto err_submit;
- }
-
- return 0;
-err_submit:
- priv->int_buf.in_use = false;
-err:
return ret;
}