mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 18:13:41 +02:00
usb: gadget: dummy_hcd: Use USB API functions rather than constants
Use the function usb_endpoint_num() rather than constants. The Coccinelle semantic patch is as follows: @@ struct usb_endpoint_descriptor *epd; @@ - (epd->bEndpointAddress & \(USB_ENDPOINT_NUMBER_MASK\|0x0f\)) + usb_endpoint_num(epd) Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Link: https://lore.kernel.org/r/20250618065750.816965-1-nichen@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1857571e4f
commit
783e15ddb5
|
|
@ -623,7 +623,7 @@ static int dummy_enable(struct usb_ep *_ep,
|
|||
|
||||
dev_dbg(udc_dev(dum), "enabled %s (ep%d%s-%s) maxpacket %d stream %s\n",
|
||||
_ep->name,
|
||||
desc->bEndpointAddress & 0x0f,
|
||||
usb_endpoint_num(desc),
|
||||
(desc->bEndpointAddress & USB_DIR_IN) ? "in" : "out",
|
||||
usb_ep_type_string(usb_endpoint_type(desc)),
|
||||
max, str_enabled_disabled(ep->stream_en));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user