Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 14d09f79 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: me_daq: fix me_ao_insn_write()



This function is supposed to write to a single analog output 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 value is written.

Fix the function so that the desired channel is determined and all
the data is written to 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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 91b0da57
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment