@@ -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;
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(-)