All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mamta Shukla <mamtashukla555@gmail.com>
To: outreachy-kernel@googlegroups.com
Cc: gregkh@linuxfoundation.org
Subject: [PATCH] staging: rts5208: Replace udelay() with usleep_range()
Date: Tue, 2 Oct 2018 18:31:24 +0530	[thread overview]
Message-ID: <20181002130124.GA27163@armorer> (raw)

    udelay(unsigned long usec) replaced with usleep_range(unsigned long
    min, unsigned long max) to prevent trigger by interrupt in specified
    duration.Also provides better scheduling,power management for drivers.

    Issue found with checkpatch.pl

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
---
 drivers/staging/rts5208/ms.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rts5208/ms.c b/drivers/staging/rts5208/ms.c
index f53adf1..6654cdd 100644
--- a/drivers/staging/rts5208/ms.c
+++ b/drivers/staging/rts5208/ms.c
@@ -3245,7 +3245,7 @@ static int ms_write_multiple_pages(struct rtsx_chip *chip, u16 old_blk,
 			return STATUS_FAIL;
 		}
 
-		udelay(30);
+		usleep_range(30, 60);
 
 		rtsx_init_cmd(chip);
 
@@ -4167,7 +4167,7 @@ int mg_set_ICV(struct scsi_cmnd *srb, struct rtsx_chip *chip)
 
 #ifdef MG_SET_ICV_SLOW
 	for (i = 0; i < 2; i++) {
-		udelay(50);
+		usleep_range(50, 100);
 
 		rtsx_init_cmd(chip);
 
-- 
1.9.1



             reply	other threads:[~2018-10-02 13:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-02 13:01 Mamta Shukla [this message]
2018-10-02 13:07 ` [Outreachy kernel] [PATCH] staging: rts5208: Replace udelay() with usleep_range() Julia Lawall
2018-10-02 13:13   ` Greg KH
2018-10-02 14:54     ` Mamta Shukla
2018-10-02 16:36       ` Greg KH
2018-10-02 20:10       ` Himanshu Jha

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=20181002130124.GA27163@armorer \
    --to=mamtashukla555@gmail.com \
    --cc=gregkh@linuxfoundation.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.