Skip to content

Commit ebaac10

Browse files
Chen Nigregkh
authored andcommitted
usb: gadget: epautoconf: 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 48175e2 commit ebaac10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/gadget/epautoconf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ struct usb_ep *usb_ep_autoconfig(
158158
if (!ep)
159159
return NULL;
160160

161-
type = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK;
161+
type = usb_endpoint_type(desc);
162162

163163
/* report (variable) full speed bulk maxpacket */
164164
if (type == USB_ENDPOINT_XFER_BULK) {

0 commit comments

Comments
 (0)