Commit c06795f1 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

usb: dwc3: qcom: fix gadget-only builds

A recent change added a dependency to the USB host stack and broke
gadget-only builds of the driver.

Fixes: 6895ea55 ("usb: dwc3: qcom: Configure wakeup interrupts during suspend")
Reported-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Reviewed-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Signed-off-by: default avatarJohan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20220804151001.23612-4-johan+linaro@kernel.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 762e7449
......@@ -310,8 +310,11 @@ static enum usb_device_speed dwc3_qcom_read_usb2_speed(struct dwc3_qcom *qcom)
* currently supports only 1 port per controller. So
* this is sufficient.
*/
#ifdef CONFIG_USB
udev = usb_hub_find_child(hcd->self.root_hub, 1);
#else
udev = NULL;
#endif
if (!udev)
return USB_SPEED_UNKNOWN;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment