Bluetooth: hci_qca: Use msleep() instead of open coding it
authorMatthias Kaehlcke <mka@chromium.org>
Tue, 26 Feb 2019 20:08:47 +0000 (12:08 -0800)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 27 Feb 2019 07:47:39 +0000 (08:47 +0100)
Call msleep() in qca_set_baudrate() instead of reimplementing it.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_qca.c

index f56d245..82f6cec 100644 (file)
@@ -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;
 }