All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rts5208: use usleep_range instead of udelay
@ 2017-10-02 11:43 Keerthi Reddy
  2017-10-02 11:48 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 2+ messages in thread
From: Keerthi Reddy @ 2017-10-02 11:43 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: devel, linux-kernel, gregkh

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



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

* Re: [Outreachy kernel] [PATCH] staging: rts5208: use usleep_range instead of udelay
  2017-10-02 11:43 [PATCH] staging: rts5208: use usleep_range instead of udelay Keerthi Reddy
@ 2017-10-02 11:48 ` Julia Lawall
  0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2017-10-02 11:48 UTC (permalink / raw)
  To: Keerthi Reddy; +Cc: outreachy-kernel, devel, linux-kernel, gregkh



On Mon, 2 Oct 2017, Keerthi Reddy wrote:

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

How do you know that it is a slow device?

Try to make the commit log message more self contained, not a continuation
of the subject line, and use the imperative.

julia

>
> 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
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20171002114322.GA8908%40manoharreddy.
> For more options, visit https://groups.google.com/d/optout.
>


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

end of thread, other threads:[~2017-10-02 11:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-02 11:43 [PATCH] staging: rts5208: use usleep_range instead of udelay Keerthi Reddy
2017-10-02 11:48 ` [Outreachy kernel] " Julia Lawall

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.