Skip to content

Commit 67fdc30

Browse files
bigguinessgregkh
authored andcommitted
staging: comedi: ni_atmio16d: 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 562de49 commit 67fdc30

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/staging/comedi/drivers/ni_atmio16d.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,12 @@ static irqreturn_t atmio16d_interrupt(int irq, void *d)
217217
{
218218
struct comedi_device *dev = d;
219219
struct comedi_subdevice *s = dev->read_subdev;
220+
unsigned short val;
220221

221-
comedi_buf_put(s, inw(dev->iobase + AD_FIFO_REG));
222-
222+
val = inw(dev->iobase + AD_FIFO_REG);
223+
comedi_buf_write_samples(s, &val, 1);
223224
comedi_handle_events(dev, s);
225+
224226
return IRQ_HANDLED;
225227
}
226228

0 commit comments

Comments
 (0)