diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-10-22 15:36:50 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-29 16:03:13 +0800 |
commit | a9c3a015c12f5c83773411bf06c6daf3d60ed61d (patch) | |
tree | d5341e88ac7e615d163c525c2fff284cbea85ac7 | |
parent | 6aec0f9af4c769fd104294745467fd8399548da7 (diff) | |
download | op-kernel-dev-a9c3a015c12f5c83773411bf06c6daf3d60ed61d.zip op-kernel-dev-a9c3a015c12f5c83773411bf06c6daf3d60ed61d.tar.gz |
staging: comedi: adv_pci1710: use comedi_buf_write_samples()
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>
-rw-r--r-- | drivers/staging/comedi/drivers/adv_pci1710.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/comedi/drivers/adv_pci1710.c b/drivers/staging/comedi/drivers/adv_pci1710.c index 5f387fa..c5422f3 100644 --- a/drivers/staging/comedi/drivers/adv_pci1710.c +++ b/drivers/staging/comedi/drivers/adv_pci1710.c @@ -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) { |