These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / staging / comedi / drivers / fl512.c
index e1f4932..0f278ff 100644 (file)
@@ -71,7 +71,7 @@ static int fl512_ai_insn_read(struct comedi_device *dev,
                outb(0, dev->iobase + FL512_AI_START_CONV_REG);
 
                /* XXX should test "done" flag instead of delay */
-               udelay(30);
+               usleep_range(30, 100);
 
                val = inb(dev->iobase + FL512_AI_LSB_REG);
                val |= (inb(dev->iobase + FL512_AI_MSB_REG) << 8);
@@ -136,11 +136,7 @@ static int fl512_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        s->range_table  = &range_fl512;
        s->insn_write   = fl512_ao_insn_write;
 
-       ret = comedi_alloc_subdev_readback(s);
-       if (ret)
-               return ret;
-
-       return 0;
+       return comedi_alloc_subdev_readback(s);
 }
 
 static struct comedi_driver fl512_driver = {