Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 59ff8848 authored by Jack Pham's avatar Jack Pham
Browse files

usb: gadget: qdss: Use usb_ep_autoconfig() instead of ss() variant



usb_ep_autoconfig_ss() is only needed in case a function wants
to match on both an EP descriptor as well as a SS companion
that specifies the number of streams. Since the QDSS function
doesn't use streams, we can simply use the normal
usb_ep_autoconfig() function instead to simplify the code.

This also allows building usb_f_qdss as a module against a GKI
kernel which doesn't currently have the usb_ep_autoconfig_ss()
symbol exported from the KMI.

Change-Id: Iab1caff332b7a9d708286a2d67ae2ee6bf490f34
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent b0b5ab39
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -402,8 +402,7 @@ static int qdss_bind(struct usb_configuration *c, struct usb_function *f)
	if (!strcmp(qdss->ch.name, USB_QDSS_CH_MDM))
		qdss_data_ep_comp_desc.bMaxBurst = 0;

	ep = usb_ep_autoconfig_ss(gadget, &qdss_ss_data_desc,
		&qdss_data_ep_comp_desc);
	ep = usb_ep_autoconfig(gadget, &qdss_ss_data_desc);
	if (!ep) {
		pr_err("%s: ep_autoconfig error\n", __func__);
		goto clear_ep;
@@ -415,8 +414,7 @@ static int qdss_bind(struct usb_configuration *c, struct usb_function *f)
		msm_ep_set_endless(qdss->port.data, true);

	if (qdss->debug_inface_enabled) {
		ep = usb_ep_autoconfig_ss(gadget, &qdss_ss_ctrl_in_desc,
			&qdss_ctrl_in_ep_comp_desc);
		ep = usb_ep_autoconfig(gadget, &qdss_ss_ctrl_in_desc);
		if (!ep) {
			pr_err("%s: ep_autoconfig error\n", __func__);
			goto clear_ep;
@@ -425,8 +423,7 @@ static int qdss_bind(struct usb_configuration *c, struct usb_function *f)
		qdss->port.ctrl_in = ep;
		ep->driver_data = qdss;

		ep = usb_ep_autoconfig_ss(gadget, &qdss_ss_ctrl_out_desc,
			&qdss_ctrl_out_ep_comp_desc);
		ep = usb_ep_autoconfig(gadget, &qdss_ss_ctrl_out_desc);
		if (!ep) {
			pr_err("%s: ep_autoconfig error\n", __func__);
			goto clear_ep;