]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: comedi: ni_atmio16d: use comedi_buf_write_samples()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 22 Oct 2014 22:36:59 +0000 (15:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2014 08:03:14 +0000 (16:03 +0800)
For aesthetics, use comedi_buf_write_samples() to add the sample to
the async buffer.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ni_atmio16d.c

index 24f8bca9ba051c904752bb08f02737471b812a00..2bac69339202cca98f92b781acc64cee08aabc9b 100644 (file)
@@ -217,10 +217,12 @@ static irqreturn_t atmio16d_interrupt(int irq, void *d)
 {
        struct comedi_device *dev = d;
        struct comedi_subdevice *s = dev->read_subdev;
+       unsigned short val;
 
-       comedi_buf_put(s, inw(dev->iobase + AD_FIFO_REG));
-
+       val = inw(dev->iobase + AD_FIFO_REG);
+       comedi_buf_write_samples(s, &val, 1);
        comedi_handle_events(dev, s);
+
        return IRQ_HANDLED;
 }