All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rts5208: Replace udelay() with usleep_range()
@ 2018-10-02 13:01 Mamta Shukla
  2018-10-02 13:07 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 6+ messages in thread
From: Mamta Shukla @ 2018-10-02 13:01 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: gregkh

    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



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-10-02 20:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-02 13:01 [PATCH] staging: rts5208: Replace udelay() with usleep_range() Mamta Shukla
2018-10-02 13:07 ` [Outreachy kernel] " 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

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.