Hi,
On Wed, Sep 22, 2010 at 08:05:05AM -0500, Sergei Shtylyov wrote:
diff -u linux-2.6/drivers/usb/musb/musb_gadget.c linux-2.6/drivers/usb/musb/musb_gadget.c
--- linux-2.6/drivers/usb/musb/musb_gadget.c
+++ linux-2.6/drivers/usb/musb/musb_gadget.c
@@ -822,9 +822,8 @@
return;
}
- /* analyze request if the ep is hot */
- if (request)
- rxstate(musb, to_musb_request(request));
+ /* Analyze request */
+ rxstate(musb, to_musb_request(request));
amended, thanks:
commit c902e3507cd2f858cf29128507b1b0cd90261d74
Author: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx>
Date: Tue Sep 21 10:03:54 2010 -0500
usb: musb: gadget: kill unreachable code in musb_g_rx()
musb_g_rx() always returns if next_request() call yields NULL, so the DBG()
near the function's end can never be invoked. Remove it along with unneeded
'return'; also remove the duplicate 'request' check...
Signed-off-by: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx>
Signed-off-by: Felipe Balbi <balbi@xxxxxx>
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index 9bf1942..517007b 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -829,7 +829,7 @@ void musb_g_rx(struct musb *musb, u8 epnum)
musb_writew(epio, MUSB_RXCSR, csr);
DBG(3, "%s iso overrun on %p\n", musb_ep->name, request);
- if (request && request->status == -EINPROGRESS)
+ if (request->status == -EINPROGRESS)
request->status = -EOVERFLOW;
}
if (csr & MUSB_RXCSR_INCOMPRX) {
@@ -882,14 +882,8 @@ void musb_g_rx(struct musb *musb, u8 epnum)
return;
}
- /* analyze request if the ep is hot */
- if (request)
- rxstate(musb, to_musb_request(request));
- else
- DBG(3, "packet waiting for %s%s request\n",
- musb_ep->desc ? "" : "inactive ",
- musb_ep->end_point.name);
- return;
+ /* Analyze request */
+ rxstate(musb, to_musb_request(request));
}
/* ------------------------------------------------------------ */
--
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html