diff mbox series

usb: dwc3-generic: Disable host driver definition if gadget only

Message ID 1620828674-24145-1-git-send-email-hayashi.kunihiko@socionext.com
State Accepted
Commit a5f9be1ed5a5e3a89478edd2f544e667046cd5ea
Headers show
Series usb: dwc3-generic: Disable host driver definition if gadget only | expand

Commit Message

Kunihiko Hayashi May 12, 2021, 2:11 p.m. UTC
Even if only USB gadget is defined, dwc3 generic driver enables
a definition and probe/remove functions for host driver.

This enables the definition if USB_HOST is enabled only.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>

---
 drivers/usb/dwc3/dwc3-generic.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.7.4

Comments

Marek Vasut May 12, 2021, 5:32 p.m. UTC | #1
On 5/12/21 4:11 PM, Kunihiko Hayashi wrote:
> Even if only USB gadget is defined, dwc3 generic driver enables

> a definition and probe/remove functions for host driver.

> 

> This enables the definition if USB_HOST is enabled only.


Applied, thanks.
diff mbox series

Patch

diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
index 30f835e..c8bf4ae 100644
--- a/drivers/usb/dwc3/dwc3-generic.c
+++ b/drivers/usb/dwc3/dwc3-generic.c
@@ -163,7 +163,8 @@  U_BOOT_DRIVER(dwc3_generic_peripheral) = {
 };
 #endif
 
-#if defined(CONFIG_SPL_USB_HOST_SUPPORT) || !defined(CONFIG_SPL_BUILD)
+#if defined(CONFIG_SPL_USB_HOST_SUPPORT) || \
+	!defined(CONFIG_SPL_BUILD) && defined(CONFIG_USB_HOST)
 static int dwc3_generic_host_probe(struct udevice *dev)
 {
 	struct xhci_hcor *hcor;