Use a local variable to hold the base register, 'reg', that is used to read from the device. Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx> Cc: Ian Abbott <abbotti@xxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/staging/comedi/drivers/acl7225b.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/acl7225b.c b/drivers/staging/comedi/drivers/acl7225b.c index 80cfa817..5afadce 100644 --- a/drivers/staging/comedi/drivers/acl7225b.c +++ b/drivers/staging/comedi/drivers/acl7225b.c @@ -64,8 +64,10 @@ static int acl7225b_di_insn_bits(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data) { - data[1] = inb(dev->iobase + (unsigned long)s->private) | - (inb(dev->iobase + (unsigned long)s->private + 1) << 8); + unsigned long reg = (unsigned long)s->private; + + data[1] = inb(dev->iobase + reg) | + (inb(dev->iobase + reg + 1) << 8); return insn->n; } -- 1.8.1.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel