staging: comedi: adv_pci1710: use comedi_buf_write_samples()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 22 Oct 2014 22:36:50 +0000 (15:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2014 08:03:13 +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/adv_pci1710.c

index 5f387fabe1f5fe954d85b79176afb4a4e7edc262..c5422f3769274c1797034d30c237548389b8f09f 100644 (file)
@@ -770,7 +770,8 @@ static void pci1710_handle_every_sample(struct comedi_device *dev,
                        break;
                }
 
-               comedi_buf_put(s, val & s->maxdata);
+               val &= s->maxdata;
+               comedi_buf_write_samples(s, &val, 1);
 
                s->async->cur_chan++;
                if (s->async->cur_chan >= cmd->chanlist_len)
@@ -814,7 +815,8 @@ static int move_block_from_fifo(struct comedi_device *dev,
                        return ret;
                }
 
-               comedi_buf_put(s, val & s->maxdata);
+               val &= s->maxdata;
+               comedi_buf_write_samples(s, &val, 1);
 
                s->async->cur_chan++;
                if (s->async->cur_chan >= cmd->chanlist_len) {
This page took 0.027983 seconds and 5 git commands to generate.