]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
usb: mtu3: fix EXTCON dependency
authorArnd Bergmann <arnd@arndb.de>
Mon, 25 Mar 2019 13:54:30 +0000 (14:54 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
BugLink: https://bugs.launchpad.net/bugs/1838116
commit 3d54d10c6afed34fd45b852bf76f55e8da31d8ef upstream.

When EXTCON is a loadable module, mtu3 fails to link as built-in:

drivers/usb/mtu3/mtu3_plat.o: In function `mtu3_probe':
mtu3_plat.c:(.text+0x690): undefined reference to `extcon_get_edev_by_phandle'

Add a Kconfig dependency to force mtu3 also to be a loadable module
if extconn is, but still allow it to be built without extcon.

Fixes: d0ed062a8b75 ("usb: mtu3: dual-role mode support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/usb/mtu3/Kconfig

index 25cd61947beea51eb185c0cd64d68289bc8f6994..a213ce94f6eb1862ab9ce0082f575e7213b36cb4 100644 (file)
@@ -4,6 +4,7 @@ config USB_MTU3
        tristate "MediaTek USB3 Dual Role controller"
        depends on EXTCON && (USB || USB_GADGET) && HAS_DMA
        depends on ARCH_MEDIATEK || COMPILE_TEST
+       depends on EXTCON || !EXTCON
        select USB_XHCI_MTK if USB_SUPPORT && USB_XHCI_HCD
        help
          Say Y or M here if your system runs on MediaTek SoCs with