Skip to content

Commit 504d023

Browse files
bigguinessgregkh
authored andcommitted
staging: comedi: usbduxsigma: use comedi_buf_write_samples()
Use comedi_buf_write_samples() to add the sample to the async buffer. That function will determining the number of bytes to add based on the bytes_per_sample(). Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 60e6644 commit 504d023

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/staging/comedi/drivers/usbduxsigma.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,7 @@ static void usbduxsigma_ai_handle_urb(struct comedi_device *dev,
245245
val &= 0x00ffffff; /* strip status byte */
246246
val ^= 0x00800000; /* convert to unsigned */
247247

248-
if (!cfc_write_array_to_buffer(s, &val,
249-
sizeof(uint32_t)))
248+
if (!comedi_buf_write_samples(s, &val, 1))
250249
return;
251250
}
252251
}

0 commit comments

Comments
 (0)