From: Arnd Bergmann <a...@arndb.de>

Selecting the chipidea driver from the old Kconfig symbol
can lead to a missing dependency:

WARNING: unmet direct dependencies detected for USB_CHIPIDEA
  Depends on [m]: USB_SUPPORT [=y] && (USB_EHCI_HCD [=y] && USB_GADGET [=m] || 
USB_EHCI_HCD [=y] && !USB_GADGET [=m] || !USB_EHCI_HCD [=y] && USB_GADGET [=m]) 
&& HAS_DMA [=y]
  Selected by [y]:
  - USB_EHCI_TEGRA [=y] && USB_SUPPORT [=y] && USB [=y] && USB_EHCI_HCD [=y] && 
ARCH_TEGRA [=y]
aarch64-linux-ld: drivers/usb/chipidea/otg.o: in function 
`ci_handle_vbus_change':
otg.c:(.text+0x3c8): undefined reference to `usb_gadget_vbus_connect'
aarch64-linux-ld: otg.c:(.text+0x42c): undefined reference to 
`usb_gadget_vbus_disconnect'
aarch64-linux-ld: drivers/usb/chipidea/otg.o: in function `ci_otg_work':
otg.c:(.text+0x5d4): undefined reference to `usb_gadget_vbus_disconnect'
...

Duplicate the dependency to ensure that this driver can
only be a loadable module if one of its dependencies is.

Fixes: c3590c7656fb ("usb: host: ehci-tegra: Remove the driver")
Signed-off-by: Arnd Bergmann <a...@arndb.de>
---
 drivers/usb/host/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 160e5d3927e2..66b01b619ecd 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -269,6 +269,7 @@ config USB_EHCI_HCD_AT91
 config USB_EHCI_TEGRA
        tristate "NVIDIA Tegra HCD support"
        depends on ARCH_TEGRA
+       depends on ((USB_EHCI_HCD && USB_GADGET) || (USB_EHCI_HCD && 
!USB_GADGET) || (!USB_EHCI_HCD && USB_GADGET)) && HAS_DMA
        select USB_CHIPIDEA
        select USB_CHIPIDEA_HOST
        select USB_CHIPIDEA_TEGRA
-- 
2.29.2

Reply via email to