Skip to content

Commit

Permalink
usb: mtu3: remove useless member @busy in mtu3_ep struct
Browse files Browse the repository at this point in the history
The member @busy in mtu3_ep struct is unnecessary, so remove it.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/1595834101-13094-8-git-send-email-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Chunfeng Yun authored and Greg Kroah-Hartman committed Jul 29, 2020
1 parent ba42897 commit bf77804
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion drivers/usb/mtu3/mtu3.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ struct mtu3_ep {

int flags;
u8 wedged;
u8 busy;
};

struct mtu3_request {
Expand Down
6 changes: 0 additions & 6 deletions drivers/usb/mtu3/mtu3_gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,13 @@ __acquires(mep->mtu->lock)
{
struct mtu3_request *mreq;
struct mtu3 *mtu;
int busy = mep->busy;

mreq = to_mtu3_request(req);
list_del(&mreq->list);
if (mreq->request.status == -EINPROGRESS)
mreq->request.status = status;

mtu = mreq->mtu;
mep->busy = 1;

trace_mtu3_req_complete(mreq);
spin_unlock(&mtu->lock);

Expand All @@ -40,14 +37,12 @@ __acquires(mep->mtu->lock)
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;

Expand Down Expand Up @@ -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++;
Expand Down

0 comments on commit bf77804

Please sign in to comment.