Skip to content

Commit b48a2e0

Browse files
Chen Nigregkh
authored andcommitted
usb: gadget: lpc32xx_udc: Use USB API functions rather than constants
Use the function usb_endpoint_type() rather than constants. The Coccinelle semantic patch is as follows: @@ struct usb_endpoint_descriptor *epd; @@ - (epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) + usb_endpoint_type(epd) Signed-off-by: Chen Ni <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ebaac10 commit b48a2e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/gadget/udc/lpc32xx_udc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1629,7 +1629,7 @@ static int lpc32xx_ep_enable(struct usb_ep *_ep,
16291629
return -ESHUTDOWN;
16301630
}
16311631

1632-
tmp = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK;
1632+
tmp = usb_endpoint_type(desc);
16331633
switch (tmp) {
16341634
case USB_ENDPOINT_XFER_CONTROL:
16351635
return -EINVAL;

0 commit comments

Comments
 (0)