Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762234AbbEERrw (ORCPT ); Tue, 5 May 2015 13:47:52 -0400 Received: from smtp121.iad3a.emailsrvr.com ([173.203.187.121]:42586 "EHLO smtp121.iad3a.emailsrvr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762214AbbEERrp (ORCPT ); Tue, 5 May 2015 13:47:45 -0400 X-Sender-Id: abbotti@mev.co.uk From: Ian Abbott To: Cc: Greg Kroah-Hartman , Ian Abbott , H Hartley Sweeten , Subject: [PATCH 3/6] staging: comedi: gsc_hpdi: usleep_range is preferred over udelay Date: Tue, 5 May 2015 18:47:26 +0100 Message-Id: <1430848049-29741-4-git-send-email-abbotti@mev.co.uk> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1430848049-29741-1-git-send-email-abbotti@mev.co.uk> References: <1430848049-29741-1-git-send-email-abbotti@mev.co.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1216 Lines: 31 Fix checkpatch issue: "CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt". `udelay()` is only called once from a place where sleeping is allowed. Replace it with a call to `usleep_range()` with a reasonable upper limit. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/gsc_hpdi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/gsc_hpdi.c b/drivers/staging/comedi/drivers/gsc_hpdi.c index 0e04f15..31ff108 100644 --- a/drivers/staging/comedi/drivers/gsc_hpdi.c +++ b/drivers/staging/comedi/drivers/gsc_hpdi.c @@ -520,7 +520,7 @@ static int gsc_hpdi_init(struct comedi_device *dev) /* wait 10usec after reset before accessing fifos */ writel(BOARD_RESET_BIT, dev->mmio + BOARD_CONTROL_REG); - udelay(10); + usleep_range(10, 1000); writel(ALMOST_EMPTY_BITS(32) | ALMOST_FULL_BITS(32), dev->mmio + RX_PROG_ALMOST_REG); -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/