All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: dgnc: replace usleep_range with udelay
@ 2017-02-27 18:14 Aishwarya Pant
  2017-03-01  8:07 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Aishwarya Pant @ 2017-02-27 18:14 UTC (permalink / raw)
  To: Lidza Louina, Mark Hounschell, Greg Kroah-Hartman; +Cc: outreachy-kernel

Replace usleep_range by udelay in function cls_flush_uart_write as it
called under a channel lock

Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
---
 drivers/staging/dgnc/dgnc_cls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/dgnc/dgnc_cls.c b/drivers/staging/dgnc/dgnc_cls.c
index c20ffdd..f116ce1 100644
--- a/drivers/staging/dgnc/dgnc_cls.c
+++ b/drivers/staging/dgnc/dgnc_cls.c
@@ -609,7 +609,7 @@ static void cls_flush_uart_write(struct channel_t *ch)
 
 	writeb((UART_FCR_ENABLE_FIFO | UART_FCR_CLEAR_XMIT),
 	       &ch->ch_cls_uart->isr_fcr);
-	usleep_range(10, 20);
+	udelay(10);
 
 	ch->ch_flags |= (CH_TX_FIFO_EMPTY | CH_TX_FIFO_LWM);
 }
-- 
2.7.4



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

* Re: [PATCH] staging: dgnc: replace usleep_range with udelay
  2017-02-27 18:14 [PATCH] staging: dgnc: replace usleep_range with udelay Aishwarya Pant
@ 2017-03-01  8:07 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2017-03-01  8:07 UTC (permalink / raw)
  To: Aishwarya Pant; +Cc: Lidza Louina, Mark Hounschell, outreachy-kernel

On Mon, Feb 27, 2017 at 11:44:36PM +0530, Aishwarya Pant wrote:
> Replace usleep_range by udelay in function cls_flush_uart_write as it
> called under a channel lock
> 
> Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
> ---
>  drivers/staging/dgnc/dgnc_cls.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/dgnc/dgnc_cls.c b/drivers/staging/dgnc/dgnc_cls.c
> index c20ffdd..f116ce1 100644
> --- a/drivers/staging/dgnc/dgnc_cls.c
> +++ b/drivers/staging/dgnc/dgnc_cls.c
> @@ -609,7 +609,7 @@ static void cls_flush_uart_write(struct channel_t *ch)
>  
>  	writeb((UART_FCR_ENABLE_FIFO | UART_FCR_CLEAR_XMIT),
>  	       &ch->ch_cls_uart->isr_fcr);
> -	usleep_range(10, 20);
> +	udelay(10);

Please comment why you can not use usleep_range() here, otherwise
someone else will come along and change it later.

thanks,

greg k-h


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

end of thread, other threads:[~2017-03-01  8:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-27 18:14 [PATCH] staging: dgnc: replace usleep_range with udelay Aishwarya Pant
2017-03-01  8:07 ` Greg Kroah-Hartman

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.