Skip to content

Commit a9c3a01

Browse files
bigguinessgregkh
authored andcommitted
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 <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 6aec0f9 commit a9c3a01

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/staging/comedi/drivers/adv_pci1710.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,8 @@ static void pci1710_handle_every_sample(struct comedi_device *dev,
770770
break;
771771
}
772772

773-
comedi_buf_put(s, val & s->maxdata);
773+
val &= s->maxdata;
774+
comedi_buf_write_samples(s, &val, 1);
774775

775776
s->async->cur_chan++;
776777
if (s->async->cur_chan >= cmd->chanlist_len)
@@ -814,7 +815,8 @@ static int move_block_from_fifo(struct comedi_device *dev,
814815
return ret;
815816
}
816817

817-
comedi_buf_put(s, val & s->maxdata);
818+
val &= s->maxdata;
819+
comedi_buf_write_samples(s, &val, 1);
818820

819821
s->async->cur_chan++;
820822
if (s->async->cur_chan >= cmd->chanlist_len) {

0 commit comments

Comments
 (0)