mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-24 10:28:57 +00:00
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:
parent
26234771c1
commit
e245b6d126
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user