From: Stephen Boyd <swboyd@chromium.org>
To: Marcel Holtmann <marcel@holtmann.org>,
Johan Hedberg <johan.hedberg@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org,
linux-arm-msm@vger.kernel.org,
Thierry Escande <thierry.escande@linaro.org>
Subject: [PATCH] Bluetooth: hci_qca: Replace open-coded msleep()
Date: Tue, 26 Jun 2018 10:06:54 -0700 [thread overview]
Message-ID: <20180626170654.96831-1-swboyd@chromium.org> (raw)
These three lines make up what msleep() already does, i.e. setting the
task to uninterruptible, sleeping for so many jiffies, and then
schedule() already puts the task state back to TASK_RUNNING when it
returns. Make things clearer by just calling msleep() instead.
Cc: Thierry Escande <thierry.escande@linaro.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
---
drivers/bluetooth/hci_qca.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 51790dd02afb..ef2b00bdf06d 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -908,9 +908,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;
}
--
Sent by a computer through tubes
next reply other threads:[~2018-06-26 17:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-26 17:06 Stephen Boyd [this message]
2018-06-26 20:49 ` Matthias Kaehlcke
2018-09-28 16:10 ` Stephen Boyd
2018-09-28 17:20 ` Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180626170654.96831-1-swboyd@chromium.org \
--to=swboyd@chromium.org \
--cc=johan.hedberg@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=thierry.escande@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®