staging: comedi: me_daq: fix bug in me_ao_insn_write()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 25 Aug 2014 23:04:28 +0000 (16:04 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Aug 2014 20:22:32 +0000 (13:22 -0700)
commit61e9332b1cf748673d6fe4217fa21730330a29d1
tree3c38a7a2b8fa0d13a42427496ef79e40b1c9dba7
parente8928754217560c70b1921de1a882cba9a069533
staging: comedi: me_daq: fix bug in me_ao_insn_write()

The comedi core expects (*insn_write) functions to write insn->n values
to the hardware and return the number of values written.

Currently, this function only writes the first value. The core also
validates all the data values so the extra masking with s->maxdata is
not needed. Fix this function to work like the core expects.

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