From: Matthias Kaehlcke Date: Tue, 26 Feb 2019 20:08:47 +0000 (-0800) Subject: Bluetooth: hci_qca: Use msleep() instead of open coding it X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6d10cd5cbd6cbd0c4f401bbf3e121ef2240d989b;p=linux.git Bluetooth: hci_qca: Use msleep() instead of open coding it Call msleep() in qca_set_baudrate() instead of reimplementing it. Signed-off-by: Matthias Kaehlcke Signed-off-by: Marcel Holtmann --- diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index f56d2459ea194..82f6cec4f71ee 100644 --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c @@ -989,9 +989,7 @@ static int qca_set_baudrate(struct hci_dev *hdev, uint8_t baudrate) * controller will come back after they receive this HCI command * then host can communicate with new baudrate to controller */ - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(msecs_to_jiffies(BAUDRATE_SETTLE_TIMEOUT_MS)); - set_current_state(TASK_RUNNING); + msleep(BAUDRATE_SETTLE_TIMEOUT_MS); return 0; }