bluetooth: bpa10x: fix BT_HCIUART dependency
PATCH 1/1 bluetooth: bpa10x: fix BT_HCIUART dependency
The change to bpa10x to use the h4_recv_buf helper added a dependency on BT_HCIUART. This was incorrectly added to Kconfig by adding a 'select' statement, which now in turn causes build failures when CONFIG_TTY is not set:
warning: (BT_HCIBPA10X) selects BT_HCIUART which has unmet direct dependencies (NET && BT && TTY) vers/built-in.o: In function `hci_uart_tty_receive':
fpga-mgr.c:(.text+0x282824): undefined reference to tty_unthrottle' drivers/built-in.o: In function hci_uart_tty_ioctl':
fpga-mgr.c:(.text+0x282aa0): undefined reference to n_tty_ioctl_helper' drivers/built-in.o: In function hci_uart_flush':
This replaces the 'select BT_HCIUART' dependency with 'depends on', which does not have this kind of problem. Alternatively, one could add 'depends on TTY', but avoiding 'select' on user-visible options is generally the preferred choice as that does not introduce the potential for dependency loops or incomplete dependency chains.
---
Found on ARM randconfig builds
drivers/bluetooth/Kconfig +1 -2
@@ -183,8 +183,7 @@ config BT_HCIBCM203X config BT_HCIBPA10X tristate "HCI BPA10x USB driver" - depends on USB - select BT_HCIUART + depends on USB && BT_HCIUART select BT_HCIUART_H4 help Bluetooth HCI BPA10x USB driver.
Marcel Holtmann
maintainerHi Arnd,
Quoted 12 lines
The change to bpa10x to use the
h4_recv_bufhelper added a dependency onBT_HCIUART. This was incorrectly added toKconfigby adding a 'select' statement, which now in turn causes build failures whenCONFIG_TTYis not set:warning: (
BT_HCIBPA10X) selectsBT_HCIUARTwhich has unmet direct dependencies (NET && BT && TTY)vers/built-in.o: In function `hci_uart_tty_receive':
fpga-mgr.c:(.text+0x282824): undefined reference totty_unthrottle' drivers/built-in.o: In functionhci_uart_tty_ioctl':
fpga-mgr.c:(.text+0x282aa0): undefined reference ton_tty_ioctl_helper' drivers/built-in.o: In functionhci_uart_flush':
Quoted 5 lines
This replaces the 'select
BT_HCIUART' dependency with 'depends on', which does not have this kind of problem. Alternatively, one could add 'depends on TTY', but avoiding 'select' on user-visible options is generally the preferred choice as that does not introduce the potential for dependency loops or incomplete dependency chains.
the intention here was to use select, but that seems to open all sorts of problems. Since I am most likely the only person that still has this device and attaches it to Linux, I am fine in going the easier path with depends on.
Patch has been applied to bluetooth-next tree.
Regards
Marcel