Commit e1ea433d authored by Saber Rezvani's avatar Saber Rezvani Committed by Greg Kroah-Hartman

staging: comedi: dyna_pci10xx: usleep_range is preferred over udelay

Fix the checkpatch.pl issue:
CHECK: usleep_range is preferred over udelay
Signed-off-by: default avatarSaber Rezvani <irsaber@gmail.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent df6ff8a1
...@@ -89,7 +89,7 @@ static int dyna_pci10xx_insn_read_ai(struct comedi_device *dev, ...@@ -89,7 +89,7 @@ static int dyna_pci10xx_insn_read_ai(struct comedi_device *dev,
/* trigger conversion */ /* trigger conversion */
smp_mb(); smp_mb();
outw_p(0x0000 + range + chan, dev->iobase + 2); outw_p(0x0000 + range + chan, dev->iobase + 2);
udelay(10); usleep_range(10, 20);
ret = comedi_timeout(dev, s, insn, dyna_pci10xx_ai_eoc, 0); ret = comedi_timeout(dev, s, insn, dyna_pci10xx_ai_eoc, 0);
if (ret) if (ret)
...@@ -125,7 +125,7 @@ static int dyna_pci10xx_insn_write_ao(struct comedi_device *dev, ...@@ -125,7 +125,7 @@ static int dyna_pci10xx_insn_write_ao(struct comedi_device *dev,
smp_mb(); smp_mb();
/* trigger conversion and write data */ /* trigger conversion and write data */
outw_p(data[n], dev->iobase); outw_p(data[n], dev->iobase);
udelay(10); usleep_range(10, 20);
} }
mutex_unlock(&devpriv->mutex); mutex_unlock(&devpriv->mutex);
return n; return n;
...@@ -143,7 +143,7 @@ static int dyna_pci10xx_di_insn_bits(struct comedi_device *dev, ...@@ -143,7 +143,7 @@ static int dyna_pci10xx_di_insn_bits(struct comedi_device *dev,
mutex_lock(&devpriv->mutex); mutex_lock(&devpriv->mutex);
smp_mb(); smp_mb();
d = inw_p(devpriv->BADR3); d = inw_p(devpriv->BADR3);
udelay(10); usleep_range(10, 100);
/* on return the data[0] contains output and data[1] contains input */ /* on return the data[0] contains output and data[1] contains input */
data[1] = d; data[1] = d;
...@@ -163,7 +163,7 @@ static int dyna_pci10xx_do_insn_bits(struct comedi_device *dev, ...@@ -163,7 +163,7 @@ static int dyna_pci10xx_do_insn_bits(struct comedi_device *dev,
if (comedi_dio_update_state(s, data)) { if (comedi_dio_update_state(s, data)) {
smp_mb(); smp_mb();
outw_p(s->state, devpriv->BADR3); outw_p(s->state, devpriv->BADR3);
udelay(10); usleep_range(10, 100);
} }
data[1] = s->state; data[1] = s->state;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment