diff options
author | Aishwarya Pant <aishpant@gmail.com> | 2017-02-27 22:31:39 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-06 09:39:54 +0100 |
commit | 5e38c984dbd98fa9f1998ff239775fd467beeb2c (patch) | |
tree | 122d3ab4045c1241b39ab5b67c6ce4fd48cb4d8f /drivers/staging/dgnc | |
parent | 4bc58d16753b99e45d84388d7e63b93d7f913a98 (diff) | |
download | linux-stable-5e38c984dbd98fa9f1998ff239775fd467beeb2c.tar.gz linux-stable-5e38c984dbd98fa9f1998ff239775fd467beeb2c.tar.bz2 linux-stable-5e38c984dbd98fa9f1998ff239775fd467beeb2c.zip |
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 <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/dgnc')
-rw-r--r-- | drivers/staging/dgnc/dgnc_cls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/dgnc/dgnc_cls.c b/drivers/staging/dgnc/dgnc_cls.c index c20ffdd254d8..28a3e1676f07 100644 --- a/drivers/staging/dgnc/dgnc_cls.c +++ b/drivers/staging/dgnc/dgnc_cls.c @@ -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); |