Skip to content

Commit fdee6d8

Browse files
jwrdegoedeholtmann
authored andcommitted
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>
1 parent e9ca080 commit fdee6d8

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎drivers/bluetooth/hci_ldisc.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ static void hci_uart_write_work(struct work_struct *work)
195195
clear_bit(HCI_UART_SENDING, &hu->tx_state);
196196
}
197197

198-
static void hci_uart_init_work(struct work_struct *work)
198+
void hci_uart_init_work(struct work_struct *work)
199199
{
200200
struct hci_uart *hu = container_of(work, struct hci_uart, init_ready);
201201
int err;

‎drivers/bluetooth/hci_serdev.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ int hci_uart_register_device(struct hci_uart *hu,
308308
hdev->bus = HCI_UART;
309309
hci_set_drvdata(hdev, hu);
310310

311+
INIT_WORK(&hu->init_ready, hci_uart_init_work);
311312
INIT_WORK(&hu->write_work, hci_uart_write_work);
312313
percpu_init_rwsem(&hu->proto_lock);
313314

‎drivers/bluetooth/hci_uart.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ void hci_uart_unregister_device(struct hci_uart *hu);
116116

117117
int hci_uart_tx_wakeup(struct hci_uart *hu);
118118
int hci_uart_init_ready(struct hci_uart *hu);
119+
void hci_uart_init_work(struct work_struct *work);
119120
void hci_uart_set_baudrate(struct hci_uart *hu, unsigned int speed);
120121
void hci_uart_set_flow_control(struct hci_uart *hu, bool enable);
121122
void hci_uart_set_speeds(struct hci_uart *hu, unsigned int init_speed,

0 commit comments

Comments
 (0)