aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2017-12-26 10:07:34 -0500
committerMarcel Holtmann <marcel@holtmann.org>2017-12-26 15:53:45 -0500
commit27378f4c1b92fe275236c69d2f7f2c27090e7b53 (patch)
tree4ad82399159c9a9ab1dfe40263bbb2ccf623391b
parent0a03f98b98c201191e3ba15a0e33f46d8660e1fd (diff)
Bluetooth: Avoid WARN splat due to missing GPIOLIB
Loading hci_bcm with CONFIG_GPIOLIB=n results in the following splat when calling gpiod_to_irq() from bcm_get_resources(): WARNING: CPU: 0 PID: 1006 at ./include/linux/gpio/consumer.h:450 bcm_get_resources+0x50/0x80 CPU: 0 PID: 1006 Comm: kworker/u8:4 Tainted: G A 4.15.0-rc4custom+ #4 Hardware name: Apple Inc. MacBook8,1/Mac-BE0E8AC46FE800CC, BIOS MB81.88Z.0168.B00.1708080033 08/08/2017 Call Trace: bcm_serdev_probe+0x8b/0xc0 driver_probe_device+0x202/0x310 __driver_attach+0x85/0x90 ? driver_probe_device+0x310/0x310 bus_for_each_dev+0x57/0x80 async_run_entry_fn+0x2c/0xd0 process_one_work+0x1d2/0x3d0 worker_thread+0x26/0x3c0 ? process_one_work+0x3d0/0x3d0 kthread+0x10c/0x130 ? kthread_create_on_node+0x40/0x40 ret_from_fork+0x1f/0x30 We could call gpiod_to_irq() only if IS_ENABLED(CONFIG_GPIOLIB) but without GPIOLIB, the driver's power saving features can't be used, so selecting GPIOLIB seems more appropriate. The same issue is present in hci_intel.c and hci_nokia.c, fix those up as well. Reported-by: Max Shavrick <mxms@me.com> Signed-off-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r--drivers/bluetooth/Kconfig3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig
index 45a2f59cd935..41932f0e68d0 100644
--- a/drivers/bluetooth/Kconfig
+++ b/drivers/bluetooth/Kconfig
@@ -110,6 +110,7 @@ config BT_HCIUART_NOKIA
110 depends on PM 110 depends on PM
111 select BT_HCIUART_H4 111 select BT_HCIUART_H4
112 select BT_BCM 112 select BT_BCM
113 select GPIOLIB
113 help 114 help
114 Nokia H4+ is serial protocol for communication between Bluetooth 115 Nokia H4+ is serial protocol for communication between Bluetooth
115 device and host. This protocol is required for Bluetooth devices 116 device and host. This protocol is required for Bluetooth devices
@@ -170,6 +171,7 @@ config BT_HCIUART_INTEL
170 depends on BT_HCIUART 171 depends on BT_HCIUART
171 select BT_HCIUART_H4 172 select BT_HCIUART_H4
172 select BT_INTEL 173 select BT_INTEL
174 select GPIOLIB
173 help 175 help
174 The Intel protocol support enables Bluetooth HCI over serial 176 The Intel protocol support enables Bluetooth HCI over serial
175 port interface for Intel Bluetooth controllers. 177 port interface for Intel Bluetooth controllers.
@@ -183,6 +185,7 @@ config BT_HCIUART_BCM
183 depends on (!ACPI || SERIAL_DEV_CTRL_TTYPORT) 185 depends on (!ACPI || SERIAL_DEV_CTRL_TTYPORT)
184 select BT_HCIUART_H4 186 select BT_HCIUART_H4
185 select BT_BCM 187 select BT_BCM
188 select GPIOLIB
186 help 189 help
187 The Broadcom protocol support enables Bluetooth HCI over serial 190 The Broadcom protocol support enables Bluetooth HCI over serial
188 port interface for Broadcom Bluetooth controllers. 191 port interface for Broadcom Bluetooth controllers.