Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fdee6d8f authored by Hans de Goede's avatar Hans de Goede Committed by Marcel Holtmann
Browse files

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: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent e9ca0807
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -195,7 +195,7 @@ static void hci_uart_write_work(struct work_struct *work)
	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;
+1 −0
Original line number Diff line number Diff line
@@ -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);

+1 −0
Original line number Diff line number Diff line
@@ -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,