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. Fix it 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>
 {
        struct daqp_private *devpriv = dev->private;
        unsigned int chan = CR_CHAN(insn->chanspec);
-       unsigned int val;
        int i;
 
        if (devpriv->stop)
        outb(0, dev->iobase + DAQP_AUX);
 
        for (i = 0; i > insn->n; i++) {
-               val = data[0];
+               unsigned val = data[i];
+
                val &= 0x0fff;
                val ^= 0x0800;          /* Flip the sign */
                val |= (chan << 12);