]> git.karo-electronics.de Git - karo-tx-linux.git/commit
staging: comedi: amplc_dio200_common: use comedi_buf_write_samples()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 22 Oct 2014 22:37:11 +0000 (15:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2014 08:03:15 +0000 (16:03 +0800)
commit2a07616cd9d5482c8388b8c4762b51f7ec02ba42
tree576c1e4ecb84213f02b5ee25d63c8a26f59c3b10
parent4c704690e743200de94526938cb03cf80c5ae0c3
staging: comedi: amplc_dio200_common: use comedi_buf_write_samples()

The dev->read_subdev used in this driver for async commands returns the
full scan with each sample so it should have the SDF_PACKED subdev_flag
set.

Add the missing subdev_flags and use comedi_buf_write_samples() to add
the sample to the async buffer.

The async events will set properly by the core. A dev_warn() message will
also be output by the core if the buffer overflows. Remove the unnecessary
events and dev_err() message in the driver.

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/amplc_dio200_common.c