staging: comedi: das800: tidy up das800_di_insn_bits()

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>
This commit is contained in:
H Hartley Sweeten 2013-04-22 18:36:45 -07:00 committed by Greg Kroah-Hartman
parent 26234771c1
commit e245b6d126

View 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;
}