From: H Hartley Sweeten Date: Tue, 3 May 2016 19:29:54 +0000 (-0700) Subject: staging: comedi: das16m1: tidy up das16m1_di_insn_bits() X-Git-Tag: v4.8-rc1~193^2~200 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8500b75c1dbe126df6f1a4b396853769986b155e;p=karo-tx-linux.git staging: comedi: das16m1: tidy up das16m1_di_insn_bits() The (*insn_bits) for a digital input subdevice only needs to return the state of the inputs in data[1]. Remove the cruft. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/das16m1.c b/drivers/staging/comedi/drivers/das16m1.c index f51da809df05..538544b4ed1c 100644 --- a/drivers/staging/comedi/drivers/das16m1.c +++ b/drivers/staging/comedi/drivers/das16m1.c @@ -352,11 +352,7 @@ static int das16m1_di_insn_bits(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data) { - unsigned int bits; - - bits = inb(dev->iobase + DAS16M1_DI_REG) & 0xf; - data[1] = bits; - data[0] = 0; + data[1] = inb(dev->iobase + DAS16M1_DI_REG) & 0xf; return insn->n; }