Bluetooth: btmtk: Fix btmtk.c undefined reference build error harder
authorArnd Bergmann <arnd@arndb.de>
Mon, 22 Jul 2024 09:27:05 +0000 (11:27 +0200)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 26 Jul 2024 14:56:05 +0000 (10:56 -0400)
The previous fix was incomplete as the link failure still persists
with CONFIG_USB=m when the sdio or serial wrappers for btmtk.c
are build-in:

btmtk.c:(.text+0x468): undefined reference to `usb_alloc_urb'
btmtk.c:(.text+0x488): undefined reference to `usb_free_urb'
btmtk.c:(.text+0x500): undefined reference to `usb_anchor_urb'
btmtk.c:(.text+0x50a): undefined reference to `usb_submit_urb'
btmtk.c:(.text+0x92c): undefined reference to `usb_control_msg'
btmtk.c:(.text+0xa92): undefined reference to `usb_unanchor_urb'
btmtk.c:(.text+0x11e4): undefined reference to `usb_set_interface'
btmtk.c:(.text+0x120a): undefined reference to `usb_kill_anchored_urbs'

Disallow this configuration.

Fixes: f0c83a23fcbb ("Bluetooth: btmtk: Fix btmtk.c undefined reference build error")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/Kconfig

index 90a94a111e67e18d53c0cc98e5e3499055a27840..769fa288179d3969f45148a3ced9ee2e00650d18 100644 (file)
@@ -413,6 +413,7 @@ config BT_ATH3K
 config BT_MTKSDIO
        tristate "MediaTek HCI SDIO driver"
        depends on MMC
+       depends on USB || !BT_HCIBTUSB_MTK
        select BT_MTK
        help
          MediaTek Bluetooth HCI SDIO driver.
@@ -425,6 +426,7 @@ config BT_MTKSDIO
 config BT_MTKUART
        tristate "MediaTek HCI UART driver"
        depends on SERIAL_DEV_BUS
+       depends on USB || !BT_HCIBTUSB_MTK
        select BT_MTK
        help
          MediaTek Bluetooth HCI UART driver.