]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
staging: comedi: das08: Correct AO output for das08jr-16-ao
authorIan Abbott <abbotti@mev.co.uk>
Fri, 31 Aug 2012 19:41:30 +0000 (20:41 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 19 Sep 2012 14:05:07 +0000 (15:05 +0100)
commit 61ed59ed09e6ad2b8395178ea5ad5f653bba08e3 upstream.

Don't zero out bits 15..12 of the data value in `das08jr_ao_winsn()` as
that knobbles the upper three-quarters of the output range for the
'das08jr-16-ao' board.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/staging/comedi/drivers/das08.c

index dc4ef4c346ffc5c59d24561e909d428391072ae7..a48fe8878a0885aa6665c224d12e51e3cff3e6d1 100644 (file)
@@ -655,7 +655,7 @@ static int das08jr_ao_winsn(struct comedi_device *dev,
        int chan;
 
        lsb = data[0] & 0xff;
-       msb = (data[0] >> 8) & 0xf;
+       msb = (data[0] >> 8) & 0xff;
 
        chan = CR_CHAN(insn->chanspec);