Skip to content

Commit

Permalink
Bluetooth: hci_qca: Use msleep() instead of open coding it
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matthias Kaehlcke authored and Marcel Holtmann committed Feb 27, 2019
1 parent 0ebcddd commit 6d10cd5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/bluetooth/hci_qca.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 6d10cd5

Please sign in to comment.