[PATCH v3 4/5] can: gs_usb.c: use rforward usb endpoints search

From: Alexander Kozhinov
Date: Tue Oct 08 2024 - 15:40:59 EST


This change implements request: Any specific reason for doing this in reverse? The previous
GS_USB_ENDPOINT_IN and GS_USB_ENDPOINT_OUT macros were respectively 1
and 2, so at the beginning. And in such a case, the normal search
would find those quicker.

Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@xxxxxxxxx>
---
drivers/net/can/usb/gs_usb.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/can/usb/gs_usb.c b/drivers/net/can/usb/gs_usb.c
index a88448dbc6af..24f715f9c436 100644
--- a/drivers/net/can/usb/gs_usb.c
+++ b/drivers/net/can/usb/gs_usb.c
@@ -1426,8 +1426,7 @@ static int gs_usb_probe(struct usb_interface *intf,
host_iface = intf->cur_altsetting;

/* Find common bulk endpoints reverse */
- rc = usb_find_common_endpoints_reverse(host_iface, &ep_in, &ep_out, NULL,
- NULL);
+ rc = usb_find_common_endpoints(host_iface, &ep_in, &ep_out, NULL, NULL);
if (rc) {
dev_err(&intf->dev, "Required endpoints not found\n");
return rc;
--
2.43.0