Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e245b6d1 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 26234771
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -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;
}