staging: comedi/daqboard2000: use mdelay for large delays

On ARM, it is not legal to pass values larger than 2ms into udelay(),
and mdelay() must be used instead, to avoid this build error:

ERROR: "__bad_udelay" [drivers/staging/comedi/drivers/daqboard2000.ko]
undefined!

On a related note, any use of mdelay() or large udelay() numbers should
be carefully reviewed, and replaced with msleep() or a different
implementation that does not rely on delaying the work.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Arnd Bergmann 2013-04-23 18:30:47 +02:00 committed by Greg Kroah-Hartman
parent 14d7547c05
commit 4623c3e0a9

View File

@ -462,9 +462,9 @@ static void daqboard2000_resetLocalBus(struct comedi_device *dev)
struct daqboard2000_private *devpriv = dev->private; struct daqboard2000_private *devpriv = dev->private;
writel(DAQBOARD2000_SECRLocalBusHi, devpriv->plx + 0x6c); writel(DAQBOARD2000_SECRLocalBusHi, devpriv->plx + 0x6c);
udelay(10000); mdelay(10);
writel(DAQBOARD2000_SECRLocalBusLo, devpriv->plx + 0x6c); writel(DAQBOARD2000_SECRLocalBusLo, devpriv->plx + 0x6c);
udelay(10000); mdelay(10);
} }
static void daqboard2000_reloadPLX(struct comedi_device *dev) static void daqboard2000_reloadPLX(struct comedi_device *dev)
@ -472,11 +472,11 @@ static void daqboard2000_reloadPLX(struct comedi_device *dev)
struct daqboard2000_private *devpriv = dev->private; struct daqboard2000_private *devpriv = dev->private;
writel(DAQBOARD2000_SECRReloadLo, devpriv->plx + 0x6c); writel(DAQBOARD2000_SECRReloadLo, devpriv->plx + 0x6c);
udelay(10000); mdelay(10);
writel(DAQBOARD2000_SECRReloadHi, devpriv->plx + 0x6c); writel(DAQBOARD2000_SECRReloadHi, devpriv->plx + 0x6c);
udelay(10000); mdelay(10);
writel(DAQBOARD2000_SECRReloadLo, devpriv->plx + 0x6c); writel(DAQBOARD2000_SECRReloadLo, devpriv->plx + 0x6c);
udelay(10000); mdelay(10);
} }
static void daqboard2000_pulseProgPin(struct comedi_device *dev) static void daqboard2000_pulseProgPin(struct comedi_device *dev)
@ -484,9 +484,9 @@ static void daqboard2000_pulseProgPin(struct comedi_device *dev)
struct daqboard2000_private *devpriv = dev->private; struct daqboard2000_private *devpriv = dev->private;
writel(DAQBOARD2000_SECRProgPinHi, devpriv->plx + 0x6c); writel(DAQBOARD2000_SECRProgPinHi, devpriv->plx + 0x6c);
udelay(10000); mdelay(10);
writel(DAQBOARD2000_SECRProgPinLo, devpriv->plx + 0x6c); writel(DAQBOARD2000_SECRProgPinLo, devpriv->plx + 0x6c);
udelay(10000); /* Not in the original code, but I like symmetry... */ mdelay(10); /* Not in the original code, but I like symmetry... */
} }
static int daqboard2000_pollCPLD(struct comedi_device *dev, int mask) static int daqboard2000_pollCPLD(struct comedi_device *dev, int mask)