[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190619154648.13840-2-lukas.s.schneider@fau.de>
Date: Wed, 19 Jun 2019 17:46:46 +0200
From: Lukas Schneider <lukas.s.schneider@....de>
To: kim.jamie.bradley@...il.com, pakki001@....edu,
colin.king@...onical.com, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Cc: Lukas Schneider <lukas.s.schneider@....de>,
Jannik Moritz <jannik.moritz@....de>
Subject: [PATCH 2/4] rts5208: Fix usleep_range is preferred over udelay
This patch fixes the issue reported by checkpatch:
CHECK: usleep_range is preferred over udelay;
see Documentation/timers/timers-howto.txt
It's save to sleep here instead of using busy waiting,
because we are not in an atomic context.
Signed-off-by: Lukas Schneider <lukas.s.schneider@....de>
Signed-off-by: Jannik Moritz <jannik.moritz@....de>
Cc <linux-kernel@...cs.fau.de>
---
drivers/staging/rts5208/rtsx_card.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rts5208/rtsx_card.c b/drivers/staging/rts5208/rtsx_card.c
index 294f381518fa..960e845133c3 100644
--- a/drivers/staging/rts5208/rtsx_card.c
+++ b/drivers/staging/rts5208/rtsx_card.c
@@ -679,7 +679,7 @@ int switch_ssc_clock(struct rtsx_chip *chip, int clk)
if (retval < 0)
return STATUS_ERROR;
- udelay(10);
+ usleep_range(10, 20);
retval = rtsx_write_register(chip, CLK_CTL, CLK_LOW_FREQ, 0);
if (retval)
return retval;
@@ -797,7 +797,7 @@ int switch_normal_clock(struct rtsx_chip *chip, int clk)
return retval;
if (sd_vpclk_phase_reset) {
- udelay(200);
+ usleep_range(200, 210);
retval = rtsx_write_register(chip, SD_VPCLK0_CTL,
PHASE_NOT_RESET, PHASE_NOT_RESET);
if (retval)
@@ -806,7 +806,7 @@ int switch_normal_clock(struct rtsx_chip *chip, int clk)
PHASE_NOT_RESET, PHASE_NOT_RESET);
if (retval)
return retval;
- udelay(200);
+ usleep_range(200, 210);
}
retval = rtsx_write_register(chip, CLK_CTL, 0xFF, 0);
if (retval)
--
2.19.1
Powered by blists - more mailing lists