diff options
author | Peter Chen <peter.chen@freescale.com> | 2011-11-21 20:55:45 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-29 09:19:04 -0500 |
commit | 7c91d908f5af027ed14b3d103331f91f386c1043 (patch) | |
tree | b4fc18dbbbd8409d8b5af74494932eb65c00497b /drivers | |
parent | bfe0658b402dab3d6fbef4b7bd81a46d0e68eb86 (diff) |
USB: fsl_udc_core: use usb_endpoint_xfer_isoc to judge ISO XFER
Some ISO gadgets, like audio, has SYNC attribute as well as
USB_ENDPOINT_XFER_ISOC for their bmAttributes at ISO endpoint
descriptor. So, it needs to use usb_endpoint_xfer_isoc to judge
ISO XFER.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Acked-by: Li Yang <leoli@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/gadget/fsl_udc_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c index 1482b12db81d..bf1cd6e55ed9 100644 --- a/drivers/usb/gadget/fsl_udc_core.c +++ b/drivers/usb/gadget/fsl_udc_core.c | |||
@@ -877,7 +877,7 @@ fsl_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags) | |||
877 | VDBG("%s, bad ep", __func__); | 877 | VDBG("%s, bad ep", __func__); |
878 | return -EINVAL; | 878 | return -EINVAL; |
879 | } | 879 | } |
880 | if (ep->desc->bmAttributes == USB_ENDPOINT_XFER_ISOC) { | 880 | if (usb_endpoint_xfer_isoc(ep->desc)) { |
881 | if (req->req.length > ep->ep.maxpacket) | 881 | if (req->req.length > ep->ep.maxpacket) |
882 | return -EMSGSIZE; | 882 | return -EMSGSIZE; |
883 | } | 883 | } |
@@ -1032,7 +1032,7 @@ static int fsl_ep_set_halt(struct usb_ep *_ep, int value) | |||
1032 | goto out; | 1032 | goto out; |
1033 | } | 1033 | } |
1034 | 1034 | ||
1035 | if (ep->desc->bmAttributes == USB_ENDPOINT_XFER_ISOC) { | 1035 | if (usb_endpoint_xfer_isoc(ep->desc)) { |
1036 | status = -EOPNOTSUPP; | 1036 | status = -EOPNOTSUPP; |
1037 | goto out; | 1037 | goto out; |
1038 | } | 1038 | } |