From 2f7acd665d0c37c3b3b5897965899808940a5b72 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 6 Jun 2011 14:18:33 +0900 Subject: [PATCH] --- yaml --- r: 259209 b: refs/heads/master c: 8a2c225ddb2d23a9b3f70af2ec70d28e4abd0b8e h: refs/heads/master i: 259207: 9b5d10ecce15047f85b486d0f06c9995166c4d0b v: v3 --- [refs] | 2 +- trunk/drivers/usb/renesas_usbhs/mod_gadget.c | 24 ++++---------------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/[refs] b/[refs] index fa768a324a24..3a53645eefe1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: dad67397f2090b29cd1f169e6a4ac6f3532c6858 +refs/heads/master: 8a2c225ddb2d23a9b3f70af2ec70d28e4abd0b8e diff --git a/trunk/drivers/usb/renesas_usbhs/mod_gadget.c b/trunk/drivers/usb/renesas_usbhs/mod_gadget.c index 50c7566369eb..28b2b37f9661 100644 --- a/trunk/drivers/usb/renesas_usbhs/mod_gadget.c +++ b/trunk/drivers/usb/renesas_usbhs/mod_gadget.c @@ -168,20 +168,6 @@ static void usbhsg_queue_push(struct usbhsg_uep *uep, req->length); } -static struct usbhsg_request *usbhsg_queue_get(struct usbhsg_uep *uep) -{ - struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); - struct usbhs_pkt *pkt = usbhs_pkt_get(pipe); - - /* - ********* assume under spin lock ********* - */ - if (!pkt) - return 0; - - return usbhsg_pkt_to_ureq(pkt); -} - static int usbhsg_queue_start(struct usbhsg_uep *uep) { struct usbhsg_gpriv *gpriv = usbhsg_uep_to_gpriv(uep); @@ -483,7 +469,7 @@ static int usbhsg_dcp_enable(struct usbhsg_uep *uep) static int usbhsg_pipe_disable(struct usbhsg_uep *uep) { struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); - struct usbhsg_request *ureq; + struct usbhs_pkt *pkt; /* ********* assume under spin lock ********* @@ -492,11 +478,11 @@ static int usbhsg_pipe_disable(struct usbhsg_uep *uep) usbhs_pipe_disable(pipe); while (1) { - ureq = usbhsg_queue_get(uep); - if (!ureq) + pkt = usbhs_pkt_get(pipe); + if (!pkt) break; - usbhsg_queue_pop(uep, ureq, -ECONNRESET); + usbhs_pkt_pop(pkt); } return 0; @@ -690,7 +676,7 @@ static int __usbhsg_ep_set_halt_wedge(struct usb_ep *ep, int halt, int wedge) /******************** spin lock ********************/ lock = usbhsg_trylock(gpriv, &flags); - if (!usbhsg_queue_get(uep)) { + if (!usbhs_pkt_get(pipe)) { dev_dbg(dev, "set halt %d (pipe %d)\n", halt, usbhs_pipe_number(pipe));