From: Aishwarya Pant Date: Mon, 27 Feb 2017 17:01:39 +0000 (+0530) Subject: staging: dgnc: replace udelay with usleep_range X-Git-Tag: Ubuntu-4.12.0-11.12~1180^2~801 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=5e38c984dbd98fa9f1998ff239775fd467beeb2c;p=mirror_ubuntu-artful-kernel.git 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 Signed-off-by: Greg Kroah-Hartman --- 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);