staging: comedi: ni_pcidio: use comedi_buf_write_samples()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 22 Oct 2014 22:37:12 +0000 (15:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2014 08:03:15 +0000 (16:03 +0800)
commitdbe81a93f499345499d7f06ba2893af7cc881053
treecfb320a797b2dfb8694f4cf4d6a7dbac5886712f
parent2a07616cd9d5482c8388b8c4762b51f7ec02ba42
staging: comedi: ni_pcidio: use comedi_buf_write_samples()

Use comedi_buf_write_samples() to add the sample to the async buffer. The 32-bit
sample size is automatically determined due to the subddev_flag SDF_LSAMPL.

The async event COMEDI_CB_BLOCK will be automatically set by the core. Remove the
unnecessary event in the driver.

This driver also has the SDF_PACKED subdev_flag set so the core will automatically
set the COMEDI_CB_EOS event after adding the sample.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ni_pcidio.c