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: 6895ea55c3
("usb: dwc3: qcom: Configure wakeup interrupts during suspend")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20220804151001.23612-4-johan+linaro@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
762e744922
commit
c06795f114
1 changed files with 4 additions and 1 deletions
|
@ -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
|
* currently supports only 1 port per controller. So
|
||||||
* this is sufficient.
|
* this is sufficient.
|
||||||
*/
|
*/
|
||||||
|
#ifdef CONFIG_USB
|
||||||
udev = usb_hub_find_child(hcd->self.root_hub, 1);
|
udev = usb_hub_find_child(hcd->self.root_hub, 1);
|
||||||
|
#else
|
||||||
|
udev = NULL;
|
||||||
|
#endif
|
||||||
if (!udev)
|
if (!udev)
|
||||||
return USB_SPEED_UNKNOWN;
|
return USB_SPEED_UNKNOWN;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue