Commit a9c3a015 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6aec0f9a
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -770,7 +770,8 @@ static void pci1710_handle_every_sample(struct comedi_device *dev,
			break;
			break;
		}
		}


		comedi_buf_put(s, val & s->maxdata);
		val &= s->maxdata;
		comedi_buf_write_samples(s, &val, 1);


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


		comedi_buf_put(s, val & s->maxdata);
		val &= s->maxdata;
		comedi_buf_write_samples(s, &val, 1);


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