]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Bluetooth: hci_serdev: Fix HCI_UART_INIT_PENDING not working
authorHans de Goede <hdegoede@redhat.com>
Sun, 27 May 2018 19:04:53 +0000 (21:04 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 30 May 2018 06:49:20 +0000 (08:49 +0200)
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>
drivers/bluetooth/hci_ldisc.c
drivers/bluetooth/hci_serdev.c
drivers/bluetooth/hci_uart.h

index 1c49964f5e601011fbec5a411ff13dad1de91459..963bb0309e25d34a44382bc3a8e9e0556cca72d1 100644 (file)
@@ -195,7 +195,7 @@ restart:
        clear_bit(HCI_UART_SENDING, &hu->tx_state);
 }
 
-static void hci_uart_init_work(struct work_struct *work)
+void hci_uart_init_work(struct work_struct *work)
 {
        struct hci_uart *hu = container_of(work, struct hci_uart, init_ready);
        int err;
index 7a3d6d636192d973ff0b745b70ce7e888131dd2f..aa2543b3c286968fece4acee97953eb2c1fe0ba8 100644 (file)
@@ -308,6 +308,7 @@ int hci_uart_register_device(struct hci_uart *hu,
        hdev->bus = HCI_UART;
        hci_set_drvdata(hdev, hu);
 
+       INIT_WORK(&hu->init_ready, hci_uart_init_work);
        INIT_WORK(&hu->write_work, hci_uart_write_work);
        percpu_init_rwsem(&hu->proto_lock);
 
index 66e8c68e4607d72e462ea0c093dcefd6fb4636d5..00cab2fd7a1b8302ef164940a784485a9198784d 100644 (file)
@@ -116,6 +116,7 @@ void hci_uart_unregister_device(struct hci_uart *hu);
 
 int hci_uart_tx_wakeup(struct hci_uart *hu);
 int hci_uart_init_ready(struct hci_uart *hu);
+void hci_uart_init_work(struct work_struct *work);
 void hci_uart_set_baudrate(struct hci_uart *hu, unsigned int speed);
 void hci_uart_set_flow_control(struct hci_uart *hu, bool enable);
 void hci_uart_set_speeds(struct hci_uart *hu, unsigned int init_speed,