Skip to contentSkip to conversation

usb: mtu3: fix EXTCON dependency

PATCH In review Arnd Bergmann 2 participants 2 messages Mar 25, 2019 – Mar 27, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: mtu3: fix EXTCON dependency

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")
---
 drivers/usb/mtu3/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/mtu3/Kconfig +1 -0
index bcc23486c4ed..928c2cd6fc00 100644
@@ -6,6 +6,7 @@ config USB_MTU3
 	tristate "MediaTek USB3 Dual Role controller"
 	depends on USB || USB_GADGET
 	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
Signature · 1 line
2.20.0
maintainer Tested-by on v1 1/1
#1 lore raw

Hi Arnd,

Quoted 7 lines · Arnd Bergmann

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.

^^ extcon

Quoted 12 lines
Fixes d0ed062a8b75 ("usb: mtu3: dual-role mode support")
---
 drivers/usb/mtu3/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/mtu3/Kconfig +0 -0
index bcc23486c4ed..928c2cd6fc00 100644

drivers/usb/mtu3/Kconfig config USB_MTU3 · line 12

Quoted 7 lines
drivers/usb/mtu3/Kconfig +1 -0
@@ -6,6 +6,7 @@ config USB_MTU3
 	tristate "MediaTek USB3 Dual Role controller"
 	depends on USB || USB_GADGET
 	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

Thank you!