From: H Hartley Sweeten Date: Tue, 23 Apr 2013 01:36:45 +0000 (-0700) Subject: staging: comedi: das800: tidy up das800_di_insn_bits() X-Git-Tag: v4.13~9725^2~6 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=e245b6d12691c1e178a6a075ac3cd1b7cd0d2e0e;p=mirror_ubuntu-bionic-kernel.git 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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/das800.c b/drivers/staging/comedi/drivers/das800.c index 4f6698dc76db..cc4202eb3958 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; }