All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keerthi Reddy <keerthigd4990@gmail.com>
To: outreachy-kernel@googlegroups.com
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	gregkh@linuxfoundation.org
Subject: [PATCH] staging: rts5208: use usleep_range instead of udelay
Date: Mon, 2 Oct 2017 17:13:22 +0530	[thread overview]
Message-ID: <20171002114322.GA8908@manoharreddy> (raw)

Since a its a slow device, allow a small range of 100

Signed-off-by: Keerthi Reddy <Keerthigd4990@gmail.com>
---
 drivers/staging/rts5208/rtsx_card.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rts5208/rtsx_card.c b/drivers/staging/rts5208/rtsx_card.c
index a6b7bff..418e29d 100644
--- a/drivers/staging/rts5208/rtsx_card.c
+++ b/drivers/staging/rts5208/rtsx_card.c
@@ -825,7 +825,7 @@ int switch_normal_clock(struct rtsx_chip *chip, int clk)
 	}
 
 	if (sd_vpclk_phase_reset) {
-		udelay(200);
+		usleep_range(200, 300);
 		retval = rtsx_write_register(chip, SD_VPCLK0_CTL,
 					     PHASE_NOT_RESET, PHASE_NOT_RESET);
 		if (retval) {
@@ -838,7 +838,7 @@ int switch_normal_clock(struct rtsx_chip *chip, int clk)
 			rtsx_trace(chip);
 			return retval;
 		}
-		udelay(200);
+		usleep_range(200, 300);
 	}
 	retval = rtsx_write_register(chip, CLK_CTL, 0xFF, 0);
 	if (retval) {
-- 
2.7.4



             reply	other threads:[~2017-10-02 11:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-02 11:43 Keerthi Reddy [this message]
2017-10-02 11:48 ` [Outreachy kernel] [PATCH] staging: rts5208: use usleep_range instead of udelay Julia Lawall

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=20171002114322.GA8908@manoharreddy \
    --to=keerthigd4990@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=outreachy-kernel@googlegroups.com \
    /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.