All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: dgnc: usleep_range is preferred over udelay
@ 2016-02-11 13:14 Aybuke Ozdemir
  2016-02-11 15:50 ` [Outreachy kernel] " Tejun Heo
  2016-02-12  3:51 ` Greg KH
  0 siblings, 2 replies; 5+ messages in thread
From: Aybuke Ozdemir @ 2016-02-11 13:14 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Aybuke Ozdemir

This patch fixes the issue:

CHECK: usleep_range is preferred over udelay; see
Documentation/timers/timers-howto.txt

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
---
 drivers/staging/dgnc/dgnc_cls.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_cls.c b/drivers/staging/dgnc/dgnc_cls.c
index 72f0aaa..ce1471b 100644
--- a/drivers/staging/dgnc/dgnc_cls.c
+++ b/drivers/staging/dgnc/dgnc_cls.c
@@ -956,7 +956,7 @@ static void cls_flush_uart_read(struct channel_t *ch)
 	 * Presumably, this is a bug in this UART.
 	 */
 
-	udelay(10);
+	usleep_range(10, 100);
 }
 
 static void cls_copy_data_from_queue_to_uart(struct channel_t *ch)
@@ -1116,7 +1116,7 @@ static void cls_assert_modem_signals(struct channel_t *ch)
 	writeb(out, &ch->ch_cls_uart->mcr);
 
 	/* Give time for the UART to actually drop the signals */
-	udelay(10);
+	usleep_range(10, 100);
 }
 
 static void cls_send_start_character(struct channel_t *ch)
@@ -1170,7 +1170,7 @@ static void cls_uart_init(struct channel_t *ch)
 
 	writeb((UART_FCR_ENABLE_FIFO|UART_FCR_CLEAR_RCVR|UART_FCR_CLEAR_XMIT),
 	       &ch->ch_cls_uart->isr_fcr);
-	udelay(10);
+	usleep_range(10, 100);
 
 	ch->ch_flags |= (CH_FIFO_ENABLED | CH_TX_FIFO_EMPTY | CH_TX_FIFO_LWM);
 
-- 
2.1.4



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

end of thread, other threads:[~2016-02-12  3:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-11 13:14 [PATCH] staging: dgnc: usleep_range is preferred over udelay Aybuke Ozdemir
2016-02-11 15:50 ` [Outreachy kernel] " Tejun Heo
2016-02-11 15:53   ` Julia Lawall
2016-02-11 15:58     ` Tejun Heo
2016-02-12  3:51 ` Greg KH

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.