From patchwork Tue Mar 2 07:10:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Md Sadre Alam X-Patchwork-Id: 392505 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD749C433E0 for ; Tue, 2 Mar 2021 13:32:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8406D64F19 for ; Tue, 2 Mar 2021 13:32:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1446181AbhCBN1h (ORCPT ); Tue, 2 Mar 2021 08:27:37 -0500 Received: from alexa-out.qualcomm.com ([129.46.98.28]:19692 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376334AbhCBHRG (ORCPT ); Tue, 2 Mar 2021 02:17:06 -0500 Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 01 Mar 2021 23:10:36 -0800 X-QCInternal: smtphost Received: from ironmsg02-blr.qualcomm.com ([10.86.208.131]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/AES256-SHA; 01 Mar 2021 23:10:34 -0800 X-QCInternal: smtphost Received: from mdalam-linux.qualcomm.com ([10.201.2.71]) by ironmsg02-blr.qualcomm.com with ESMTP; 02 Mar 2021 12:40:15 +0530 Received: by mdalam-linux.qualcomm.com (Postfix, from userid 466583) id 55B2320EB6; Tue, 2 Mar 2021 12:40:15 +0530 (IST) From: Md Sadre Alam 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 Subject: [PATCH] spi: qup: Change usleep_range to udelay Date: Tue, 2 Mar 2021 12:40:13 +0530 Message-Id: <1614669013-1755-1-git-send-email-mdalam@codeaurora.org> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org 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 --- 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;