]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
staging: comedi: das800: tidy up das800_di_insn_bits()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 23 Apr 2013 01:36:45 +0000 (18:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Apr 2013 17:41:51 +0000 (10:41 -0700)
For digital input subdevices, the (*insn_bits) function simply needs
to return the status of the input channels in data[1].

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/das800.c

index 4f6698dc76db8298a76017e3902b62ac7ee5533b..cc4202eb39583f7199f87ef62949e72f9633e42e 100644 (file)
@@ -632,12 +632,7 @@ static int das800_di_insn_bits(struct comedi_device *dev,
                               struct comedi_insn *insn,
                               unsigned int *data)
 {
-       unsigned int bits;
-
-       bits = inb(dev->iobase + DAS800_STATUS) >> 4;
-       bits &= 0x7;
-       data[1] = bits;
-       data[0] = 0;
+       data[1] = (inb(dev->iobase + DAS800_STATUS) >> 4) & 0x7;
 
        return insn->n;
 }