]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitd0059c8eda23094c95cc1e59c0722e4efb7d70ff
tree3c38a7a2b8fa0d13a42427496ef79e40b1c9dba7
parent55c2e9314d957afa2827bc8788743fd652761639
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