All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: dgnc: replace udelay with usleep_range
@ 2017-02-26 18:38 Aishwarya Pant
  2017-02-26 19:02 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 4+ messages in thread
From: Aishwarya Pant @ 2017-02-26 18:38 UTC (permalink / raw)
  To: Lidza Louina, Mark Hounschell, Greg Kroah-Hartman; +Cc: outreachy-kernel

Adding first patch for checkpatch warning on dgnc_cls.c -
CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt

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

diff --git a/drivers/staging/dgnc/dgnc_cls.c b/drivers/staging/dgnc/dgnc_cls.c
index c20ffdd..2cf146e 100644
--- a/drivers/staging/dgnc/dgnc_cls.c
+++ b/drivers/staging/dgnc/dgnc_cls.c
@@ -16,7 +16,7 @@
 #include <linux/kernel.h>
 #include <linux/sched.h>	/* For jiffies, task states */
 #include <linux/interrupt.h>	/* For tasklet and interrupt structs/defines */
-#include <linux/delay.h>	/* For udelay */
+#include <linux/delay.h>	/* For usleep_range */
 #include <linux/io.h>		/* For read[bwl]/write[bwl] */
 #include <linux/serial.h>	/* For struct async_serial */
 #include <linux/serial_reg.h>	/* For the various UART offsets */
@@ -409,7 +409,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, 20);
 }
 
 static void cls_copy_data_from_queue_to_uart(struct channel_t *ch)
@@ -631,7 +631,7 @@ static void cls_flush_uart_read(struct channel_t *ch)
 	 * Presumably, this is a bug in this UART.
 	 */
 
-	udelay(10);
+	usleep_range(10, 20);
 }
 
 /*
@@ -1096,7 +1096,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, 20);
 
 	ch->ch_flags |= (CH_FIFO_ENABLED | CH_TX_FIFO_EMPTY | CH_TX_FIFO_LWM);
 
-- 
2.7.4



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

end of thread, other threads:[~2017-02-27 13:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-26 18:38 [PATCH] staging: dgnc: replace udelay with usleep_range Aishwarya Pant
2017-02-26 19:02 ` [Outreachy kernel] " Julia Lawall
2017-02-27 11:46   ` Aishwarya Pant
2017-02-27 13:55     ` 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.