]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
staging: comedi: acl7225b: cleanup acl7225b_di_insn_bits()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 8 Apr 2013 21:31:41 +0000 (14:31 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Apr 2013 23:19:44 +0000 (16:19 -0700)
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@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/acl7225b.c

index 80cfa817dd45e6ce23e3068b5b069c81c996ed76..5afadce5a2484885da735b7f3e54cb56f95b7ab3 100644 (file)
@@ -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;
 }