linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	Peter Chen <peter.chen@kernel.org>,
	Dmitry Osipenko <digetx@gmail.com>,
	Thierry Reding <treding@nvidia.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] usb: host: ehci-tegra: fix Kconfig depencies
Date: Mon, 25 Jan 2021 12:32:30 +0100	[thread overview]
Message-ID: <20210125113248.2268952-1-arnd@kernel.org> (raw)

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


             reply	other threads:[~2021-01-25 12:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25 11:32 Arnd Bergmann [this message]
2021-01-25 16:22 ` [PATCH] usb: host: ehci-tegra: fix Kconfig depencies Alan Stern
2021-01-25 21:10   ` Arnd Bergmann
2021-03-09 15:09     ` Dmitry Osipenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210125113248.2268952-1-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=arnd@arndb.de \
    --cc=digetx@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=peter.chen@kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=treding@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).