diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-04-23 01:36:45 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-23 17:41:51 (GMT) |
commit | e245b6d12691c1e178a6a075ac3cd1b7cd0d2e0e (patch) | |
tree | 4848e7dcb2abd71ca1f251ad28f8634dc4421221 /drivers/staging | |
parent | 26234771c1a53b0a3bf69c161d79cd37c77ebd1a (diff) | |
download | linux-e245b6d12691c1e178a6a075ac3cd1b7cd0d2e0e.tar.xz |
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/comedi/drivers/das800.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/staging/comedi/drivers/das800.c b/drivers/staging/comedi/drivers/das800.c index 4f6698dc..cc4202e 100644 --- a/drivers/staging/comedi/drivers/das800.c +++ b/drivers/staging/comedi/drivers/das800.c @@ -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; } |