[PATCH] USB: fsl_udc_core: Use (&) instead of (==) to compare ISO XFER
Felipe Balbi
balbi at ti.com
Thu Nov 24 20:37:47 EST 2011
On Tue, Nov 22, 2011 at 02:26:24AM +0100, Michal Nazarewicz wrote:
> >On Tue, 22 Nov 2011 02:15:21 +0100, Peter Chen <peter.chen at freescale.com> wrote:
> >>@@ -877,7 +877,7 @@ fsl_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
> >> VDBG("%s, bad ep", __func__);
> >> return -EINVAL;
> >> }
> >>- if (ep->desc->bmAttributes == USB_ENDPOINT_XFER_ISOC) {
> >>+ if (ep->desc->bmAttributes & USB_ENDPOINT_XFER_ISOC) {
>
> On Tue, 22 Nov 2011 02:22:10 +0100, Michal Nazarewicz <mina86 at mina86.com> wrote:
> >What you really meant is:
> >
> >(ep->desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_ISOC
> >
> >It would probably be useful to create a function that performs that check rather
> >than having to type all of that every time.
>
> Ah, there it is:
>
> usb_endpoint_xfer_isoc(ep)
yeah, please use the helpers.
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20111124/d6bbdeea/attachment-0001.pgp>
More information about the Linuxppc-dev
mailing list