Skip to content

Commit

Permalink
staging: comedi: das800: tidy up das800_di_insn_bits()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Apr 23, 2013
1 parent 2623477 commit e245b6d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/staging/comedi/drivers/das800.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e245b6d

Please sign in to comment.