mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-16 23:36:09 -05:00
usb: dwc2: gadget: 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/20250519062229.724664-1-nichen@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
eb25dcf0c5
commit
48175e2e6e
@@ -4049,7 +4049,7 @@ static int dwc2_hsotg_ep_enable(struct usb_ep *ep,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ep_type = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK;
|
||||
ep_type = usb_endpoint_type(desc);
|
||||
mps = usb_endpoint_maxp(desc);
|
||||
mc = usb_endpoint_maxp_mult(desc);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user