diff mbox series

spi: qup: Change usleep_range to udelay

Message ID 1614669013-1755-1-git-send-email-mdalam@codeaurora.org (mailing list archive)
State New
Headers show
Series spi: qup: Change usleep_range to udelay | expand

Commit Message

Md Sadre Alam March 2, 2021, 7:10 a.m. UTC
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 mbox series

Patch

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;