usb: gadget: pch_udc: Use USB API functions rather than constants
authorChen Ni <nichen@iscas.ac.cn>
Wed, 18 Jun 2025 04:09:08 +0000 (12:09 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jun 2025 10:24:05 +0000 (12:24 +0200)
commitd61b9060f9907e8f4bcb0577126f2523d10e6e66
tree4c840bafd0955bb2c6ab63494b3812d32a0caf0a
parentfd2f928a5f7bc2f95887478c25b817f6e2215f3d
usb: gadget: pch_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 <nichen@iscas.ac.cn>
Link: https://lore.kernel.org/r/20250618040908.408309-1-nichen@iscas.ac.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/pch_udc.c