Skip to content

Commit 60e6644

Browse files
bigguinessgregkh
authored andcommitted
staging: comedi: gsc_hpdi: use comedi_buf_write_samples()
Use comedi_buf_write_samples() to add the samples to the async buffer. That function will handle the '* sizeof(foo)' calculation to determine the number of bytes to add. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent d4c2acd commit 60e6644

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/staging/comedi/drivers/gsc_hpdi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ static void gsc_hpdi_drain_dma(struct comedi_device *dev, unsigned int channel)
196196
size = devpriv->dio_count;
197197
devpriv->dio_count -= size;
198198
}
199-
cfc_write_array_to_buffer(s, devpriv->desc_dio_buffer[idx],
200-
size * sizeof(uint32_t));
199+
comedi_buf_write_samples(s, devpriv->desc_dio_buffer[idx],
200+
size);
201201
idx++;
202202
idx %= devpriv->num_dma_descriptors;
203203
start = le32_to_cpu(devpriv->dma_desc[idx].pci_start_addr);

0 commit comments

Comments
 (0)