[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1463478773-5916-15-git-send-email-abbotti@mev.co.uk>
Date: Tue, 17 May 2016 10:52:53 +0100
From: Ian Abbott <abbotti@....co.uk>
To: devel@...verdev.osuosl.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Ian Abbott <abbotti@....co.uk>,
H Hartley Sweeten <hsweeten@...ionengravers.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 14/14] staging: comedi: daqboard2000: prefer usleep_range()
The checkpatch.pl warns about two `udelay(x)` calls, one of 100
microseconds, and one of 10 microseconds. The 100 microseconds one is
used when waiting for FPGA to become ready to accept firmware, and is
not that critical, so replace it with a call to `usleep_range(100,
1000)`. The 10 microseconds one is called as each 16-bit word of
firmware data is written. A longer sleep would slow down firmware
loading, so leave it alone.
Signed-off-by: Ian Abbott <abbotti@....co.uk>
---
drivers/staging/comedi/drivers/daqboard2000.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c
index 846de82..0831547 100644
--- a/drivers/staging/comedi/drivers/daqboard2000.c
+++ b/drivers/staging/comedi/drivers/daqboard2000.c
@@ -476,7 +476,7 @@ static int daqboard2000_poll_cpld(struct comedi_device *dev, int mask)
result = 1;
break;
}
- udelay(100);
+ usleep_range(100, 1000);
}
udelay(5);
return result;
--
2.8.1
Powered by blists - more mailing lists