Title: [7734] trunk/drivers/usb/gadget/epautoconf.c: bug[#5632]add INT ep support and initialize pointer ep
- Revision
- 7734
- Author
- cliff
- Date
- 2009-10-30 06:03:46 -0400 (Fri, 30 Oct 2009)
Log Message
bug[#5632]add INT ep support and initialize pointer ep
Modified Paths
Diff
Modified: trunk/drivers/usb/gadget/epautoconf.c (7733 => 7734)
--- trunk/drivers/usb/gadget/epautoconf.c 2009-10-30 08:49:36 UTC (rev 7733)
+++ trunk/drivers/usb/gadget/epautoconf.c 2009-10-30 10:03:46 UTC (rev 7734)
@@ -234,7 +234,7 @@
struct usb_endpoint_descriptor *desc
)
{
- struct usb_ep *ep;
+ struct usb_ep *ep = NULL;
u8 type;
type = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK;
@@ -284,6 +284,11 @@
ep = find_ep (gadget, "ep5in");
else
ep = find_ep (gadget, "ep6out");
+ } else if (USB_ENDPOINT_XFER_INT == type) {
+ if (USB_DIR_IN & desc->bEndpointAddress)
+ ep = find_ep(gadget, "ep1in");
+ else
+ ep = find_ep(gadget, "ep2out");
}
if (ep && ep_matches (gadget, ep, desc))
return ep;
@@ -297,7 +302,7 @@
}
/* Fail */
- return NULL;
+ return ep;
}
/**
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits