[PATCH] usb: chipidea: udc: Use usb_endpoint_is_isoc_in() rather than duplicating its implementation

Markus Elfring
2025-06-24T15:45:58Z

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 24 Jun 2025 17:30:52 +0200

Reuse existing functionality from usb_endpoint_is_isoc_in() instead of
keeping duplicate source code.

The source code was transformed by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/usb/chipidea/udc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 64a421ae0f05..75705089136c 100644
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -1992,7 +1992,7 @@ static struct usb_ep *ci_udc_match_ep(struct usb_gadget *gadget,
struct ci_hdrc *ci = container_of(gadget, struct ci_hdrc, gadget);
struct usb_ep *ep;

- if (usb_endpoint_xfer_isoc(desc) && usb_endpoint_dir_in(desc)) {
+ if (usb_endpoint_is_isoc_in(desc)) {
list_for_each_entry_reverse(ep, &ci->gadget.ep_list, ep_list) {
if (ep->caps.dir_in && !ep->claimed)
return ep;
--
2.50.0