All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: host: ehci-tegra: fix Kconfig depencies
@ 2021-01-25 11:32 Arnd Bergmann
  2021-01-25 16:22 ` Alan Stern
  0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2021-01-25 11:32 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Alan Stern, Peter Chen, Dmitry Osipenko,
	Thierry Reding
  Cc: Arnd Bergmann, linux-usb, linux-kernel

From: Arnd Bergmann <arnd@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 <arnd@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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-03-09 15:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-25 11:32 [PATCH] usb: host: ehci-tegra: fix Kconfig depencies Arnd Bergmann
2021-01-25 16:22 ` Alan Stern
2021-01-25 21:10   ` Arnd Bergmann
2021-03-09 15:09     ` Dmitry Osipenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.