staging: comedi: me_daq: fix me_ao_insn_read()

This function is supposed to return the analog output value for
a specified channel. The channel number is packed in insn->chanspec,
which is an unsigned int, and unpacked using the CR_CHAN() macro.

Currently this function is trying to use the chanspec as an array.
This works only if a single data value is read.

Fix the function so that the desired channel is determined and all
the data returned is from that channel.

Also, fix the return. The comedi core expects insn_read functions to
return the number of data values (insn->n).

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 file changed