Re: [PATCH] USB: fsl_udc_core: Use (&) instead of (==) to compare ISO XFER

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 22 Nov 2011 02:15:21 +0100, Peter Chen <peter.chen@xxxxxxxxxxxxx> 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@xxxxxxxxxx> 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)

:)


 		if (req->req.length > ep->ep.maxpacket)
 			return -EMSGSIZE;
 	}

--
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: mpn@xxxxxxxxxx>--------------ooO--(_)--Ooo--
--
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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux