Skip to contentSkip to conversation

staging: dgnc: replaces udelay with usleep_range in dgnc_cls.c

PATCH In review Juliana Rodrigues 2 participants 2 messages Mar 13, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: dgnc: replaces udelay with usleep_range in dgnc_cls.c

This patch fixes the following issue on checkpatch.pl:

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

---
 drivers/staging/dgnc/dgnc_cls.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/dgnc/dgnc_cls.c +2 -1
index 6e1e475..ac6f7cd 100644
@@ -1172,7 +1172,8 @@ static void cls_uart_init(struct channel_t *ch)
 		UART_FCR_CLEAR_RCVR  |
 		UART_FCR_CLEAR_XMIT),
 		&ch->ch_cls_uart->isr_fcr);
-	udelay(10);
+
+	usleep_range(10000, 11000);
 
 	ch->ch_flags |= (CH_FIFO_ENABLED | CH_TX_FIFO_EMPTY | CH_TX_FIFO_LWM);
 
Signature · 1 line
2.7.2
#1 lore raw
Quoted 15 lines · Juliana Rodrigues

This patch fixes the following issue on checkpatch.pl:

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

---
 drivers/staging/dgnc/dgnc_cls.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/dgnc/dgnc_cls.c +0 -0
index 6e1e475..ac6f7cd 100644

drivers/staging/dgnc/dgnc_cls.c static void cls_uart_init(struct channel_t *ch) · line 1175

Quoted 5 lines
drivers/staging/dgnc/dgnc_cls.c +1 -1
@@ -1172,7 +1172,8 @@ static void cls_uart_init(struct channel_t *ch)
 		UART_FCR_CLEAR_RCVR  |
 		UART_FCR_CLEAR_XMIT),
 		&ch->ch_cls_uart->isr_fcr);
-	udelay(10);
+

Why the blank line?

julia

Quoted 14 lines
drivers/staging/dgnc/dgnc_cls.c +1 -0
+	usleep_range(10000, 11000);
 
 	ch->ch_flags |= (CH_FIFO_ENABLED | CH_TX_FIFO_EMPTY | CH_TX_FIFO_LWM);
 
Signature · 8 lines
2.7.2

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160313014216.GA20292%40spock.
For more options, visit https://groups.google.com/d/optout.