staging: comedi: cb_pcidas: fix trimpot_write_insn()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 20 Nov 2014 22:07:26 +0000 (15:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Nov 2014 23:39:16 +0000 (15:39 -0800)
commit7a82a2c4e4aa0cdace951cf35c266d02fb96039f
treec00f6d118016d0c9ea8705d56c2a475b96cfaa3f
parent3f5ced0d0241d64b43c33402e714198824d5b0de
staging: comedi: cb_pcidas: fix trimpot_write_insn()

The comedi core expects the (*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. For this subdevice it only makes
sense to write the final data value.

Fix the function to work like the core expects. For aesthetics, rename the
function so it has namespace associated with 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/cb_pcidas.c