Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

USB: at91_udc: use helper functions to determine endpoint type and direction

Use helper functions to determine the type and direction of an endpoint
instead of fiddling with bEndpointAddress and bmAttributes

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Matthias Kaehlcke and committed by
Greg Kroah-Hartman
81c8d8d2 71de6b63

+2 -2
+2 -2
drivers/usb/gadget/at91_udc.c
··· 485 485 return -ESHUTDOWN; 486 486 } 487 487 488 - tmp = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; 488 + tmp = usb_endpoint_type(desc); 489 489 switch (tmp) { 490 490 case USB_ENDPOINT_XFER_CONTROL: 491 491 DBG("only one control endpoint\n"); ··· 517 517 local_irq_save(flags); 518 518 519 519 /* initialize endpoint to match this descriptor */ 520 - ep->is_in = (desc->bEndpointAddress & USB_DIR_IN) != 0; 520 + ep->is_in = usb_endpoint_dir_in(desc); 521 521 ep->is_iso = (tmp == USB_ENDPOINT_XFER_ISOC); 522 522 ep->stopped = 0; 523 523 if (ep->is_in)