From: Md Sadre Alam <mdalam@codeaurora.org>
To: agross@kernel.org, bjorn.andersson@linaro.org,
broonie@kernel.org, linux-arm-msm@vger.kernel.org,
linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Md Sadre Alam <mdalam@codeaurora.org>
Subject: [PATCH] spi: qup: Change usleep_range to udelay
Date: Tue, 2 Mar 2021 12:40:13 +0530 [thread overview]
Message-ID: <1614669013-1755-1-git-send-email-mdalam@codeaurora.org> (raw)
Change usleep_range() to udelay(). Since delay request
for 1 to 2 usec so we have to use udelay() instead of
usleep_range() as per kernel documentation.
Signed-off-by: Md Sadre Alam <mdalam@codeaurora.org>
---
drivers/spi/spi-qup.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi-qup.c b/drivers/spi/spi-qup.c
index 8dcb2e7..37b013f 100644
--- a/drivers/spi/spi-qup.c
+++ b/drivers/spi/spi-qup.c
@@ -189,7 +189,7 @@ static int spi_qup_set_state(struct spi_qup *controller, u32 state)
loop = 0;
while (!spi_qup_is_valid_state(controller)) {
- usleep_range(SPI_DELAY_THRESHOLD, SPI_DELAY_THRESHOLD * 2);
+ udelay(SPI_DELAY_THRESHOLD);
if (++loop > SPI_DELAY_RETRY)
return -EIO;
@@ -217,7 +217,7 @@ static int spi_qup_set_state(struct spi_qup *controller, u32 state)
loop = 0;
while (!spi_qup_is_valid_state(controller)) {
- usleep_range(SPI_DELAY_THRESHOLD, SPI_DELAY_THRESHOLD * 2);
+ udelay(SPI_DELAY_THRESHOLD);
if (++loop > SPI_DELAY_RETRY)
return -EIO;
--
2.7.4
reply other threads:[~2021-03-03 1:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1614669013-1755-1-git-send-email-mdalam@codeaurora.org \
--to=mdalam@codeaurora.org \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=broonie@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.