diff mbox series

[1/2] staging: vt6656: Remove vnt_interrupt_buffer in_use flag.

Message ID 69585034-4318-4bec-7d9b-f64a167df237@gmail.com
State New
Headers show
Series [1/2] staging: vt6656: Remove vnt_interrupt_buffer in_use flag. | expand

Commit Message

Malcolm Priestley March 4, 2020, 7:41 p.m. UTC
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>
---
 drivers/staging/vt6656/device.h  |  1 -
 drivers/staging/vt6656/usbpipe.c | 28 +++-------------------------
 2 files changed, 3 insertions(+), 26 deletions(-)
diff mbox series

Patch

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;
 }