mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 06:04:44 +01:00
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 <nichen@iscas.ac.cn> Link: https://lore.kernel.org/r/20250519062545.724727-1-nichen@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
48175e2e6e
commit
ebaac1027a
1 changed files with 1 additions and 1 deletions
|
|
@ -158,7 +158,7 @@ struct usb_ep *usb_ep_autoconfig(
|
|||
if (!ep)
|
||||
return NULL;
|
||||
|
||||
type = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK;
|
||||
type = usb_endpoint_type(desc);
|
||||
|
||||
/* report (variable) full speed bulk maxpacket */
|
||||
if (type == USB_ENDPOINT_XFER_BULK) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue