summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2018-05-27 15:04:53 -0400
committerMarcel Holtmann <marcel@holtmann.org>2018-05-30 02:49:20 -0400
commitfdee6d8fc630fa82e06d792f3adadab3bd48666e (patch)
treeb8359a7c76af3ec799f0f1720b92899ae2f08ad1 /drivers
parente9ca08074ddcdcc3abacbfca888dba3a110e4453 (diff)
Bluetooth: hci_serdev: Fix HCI_UART_INIT_PENDING not working
Init hci_uart->init_ready so that hci_uart_init_ready() works properly. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/bluetooth/hci_ldisc.c2
-rw-r--r--drivers/bluetooth/hci_serdev.c1
-rw-r--r--drivers/bluetooth/hci_uart.h1
3 files changed, 3 insertions, 1 deletions
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index 1c49964f5e60..963bb0309e25 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -195,7 +195,7 @@ restart:
195 clear_bit(HCI_UART_SENDING, &hu->tx_state); 195 clear_bit(HCI_UART_SENDING, &hu->tx_state);
196} 196}
197 197
198static void hci_uart_init_work(struct work_struct *work) 198void hci_uart_init_work(struct work_struct *work)
199{ 199{
200 struct hci_uart *hu = container_of(work, struct hci_uart, init_ready); 200 struct hci_uart *hu = container_of(work, struct hci_uart, init_ready);
201 int err; 201 int err;
diff --git a/drivers/bluetooth/hci_serdev.c b/drivers/bluetooth/hci_serdev.c
index 7a3d6d636192..aa2543b3c286 100644
--- a/drivers/bluetooth/hci_serdev.c
+++ b/drivers/bluetooth/hci_serdev.c
@@ -308,6 +308,7 @@ int hci_uart_register_device(struct hci_uart *hu,
308 hdev->bus = HCI_UART; 308 hdev->bus = HCI_UART;
309 hci_set_drvdata(hdev, hu); 309 hci_set_drvdata(hdev, hu);
310 310
311 INIT_WORK(&hu->init_ready, hci_uart_init_work);
311 INIT_WORK(&hu->write_work, hci_uart_write_work); 312 INIT_WORK(&hu->write_work, hci_uart_write_work);
312 percpu_init_rwsem(&hu->proto_lock); 313 percpu_init_rwsem(&hu->proto_lock);
313 314
diff --git a/drivers/bluetooth/hci_uart.h b/drivers/bluetooth/hci_uart.h
index 66e8c68e4607..00cab2fd7a1b 100644
--- a/drivers/bluetooth/hci_uart.h
+++ b/drivers/bluetooth/hci_uart.h
@@ -116,6 +116,7 @@ void hci_uart_unregister_device(struct hci_uart *hu);
116 116
117int hci_uart_tx_wakeup(struct hci_uart *hu); 117int hci_uart_tx_wakeup(struct hci_uart *hu);
118int hci_uart_init_ready(struct hci_uart *hu); 118int hci_uart_init_ready(struct hci_uart *hu);
119void hci_uart_init_work(struct work_struct *work);
119void hci_uart_set_baudrate(struct hci_uart *hu, unsigned int speed); 120void hci_uart_set_baudrate(struct hci_uart *hu, unsigned int speed);
120void hci_uart_set_flow_control(struct hci_uart *hu, bool enable); 121void hci_uart_set_flow_control(struct hci_uart *hu, bool enable);
121void hci_uart_set_speeds(struct hci_uart *hu, unsigned int init_speed, 122void hci_uart_set_speeds(struct hci_uart *hu, unsigned int init_speed,