Skip to content

Commit 5e38c98

Browse files
aishpantgregkh
authored andcommitted
staging: dgnc: replace udelay with usleep_range
Fix checkpatch warning on dgnc_cls.c: CHECK usleep_range is preferred over udelay. udelay(t) in function cls_uart_init is within non-atomic context and can be safely replaced by usleep_range(t, t + delta) where delta is t (as t is between 10 and 20 microseconds). Signed-off-by: Aishwarya Pant <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 4bc58d1 commit 5e38c98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/staging/dgnc/dgnc_cls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,7 @@ static void cls_uart_init(struct channel_t *ch)
10961096

10971097
writeb(UART_FCR_ENABLE_FIFO | UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT,
10981098
&ch->ch_cls_uart->isr_fcr);
1099-
udelay(10);
1099+
usleep_range(10, 20);
11001100

11011101
ch->ch_flags |= (CH_FIFO_ENABLED | CH_TX_FIFO_EMPTY | CH_TX_FIFO_LWM);
11021102

0 commit comments

Comments
 (0)