diff mbox series

[08/11] usb: mtu3: remove useless member @busy in mtu3_ep struct

Message ID 1595834101-13094-8-git-send-email-chunfeng.yun@mediatek.com (mailing list archive)
State Mainlined
Commit bf77804b1cbdeb78b89a0584b7e225ceba862183
Headers show
Series [01/11] usb: mtu3: remove unnecessary pointer checks | expand

Commit Message

Chunfeng Yun (云春峰) July 27, 2020, 7:14 a.m. UTC
The member @busy in mtu3_ep struct is unnecessary, so remove it.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/usb/mtu3/mtu3.h        | 1 -
 drivers/usb/mtu3/mtu3_gadget.c | 6 ------
 2 files changed, 7 deletions(-)
diff mbox series

Patch

diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h
index 9d68f25..8fd83bd 100644
--- a/drivers/usb/mtu3/mtu3.h
+++ b/drivers/usb/mtu3/mtu3.h
@@ -294,7 +294,6 @@  struct mtu3_ep {
 
 	int flags;
 	u8 wedged;
-	u8 busy;
 };
 
 struct mtu3_request {
diff --git a/drivers/usb/mtu3/mtu3_gadget.c b/drivers/usb/mtu3/mtu3_gadget.c
index 2bc9a95..ef9fcd5 100644
--- a/drivers/usb/mtu3/mtu3_gadget.c
+++ b/drivers/usb/mtu3/mtu3_gadget.c
@@ -17,7 +17,6 @@  void mtu3_req_complete(struct mtu3_ep *mep,
 {
 	struct mtu3_request *mreq;
 	struct mtu3 *mtu;
-	int busy = mep->busy;
 
 	mreq = to_mtu3_request(req);
 	list_del(&mreq->list);
@@ -25,8 +24,6 @@  void mtu3_req_complete(struct mtu3_ep *mep,
 		mreq->request.status = status;
 
 	mtu = mreq->mtu;
-	mep->busy = 1;
-
 	trace_mtu3_req_complete(mreq);
 	spin_unlock(&mtu->lock);
 
@@ -40,14 +37,12 @@  void mtu3_req_complete(struct mtu3_ep *mep,
 	usb_gadget_giveback_request(&mep->ep, &mreq->request);
 
 	spin_lock(&mtu->lock);
-	mep->busy = busy;
 }
 
 static void nuke(struct mtu3_ep *mep, const int status)
 {
 	struct mtu3_request *mreq = NULL;
 
-	mep->busy = 1;
 	if (list_empty(&mep->req_list))
 		return;
 
@@ -195,7 +190,6 @@  static int mtu3_gadget_ep_enable(struct usb_ep *ep,
 	if (ret)
 		goto error;
 
-	mep->busy = 0;
 	mep->wedged = 0;
 	mep->flags |= MTU3_EP_ENABLED;
 	mtu->active_ep++;