From 500880a84057eac2e6199a464ad863370167aa6b Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Mon, 8 Apr 2013 14:31:41 -0700 Subject: [PATCH] staging: comedi: acl7225b: cleanup acl7225b_di_insn_bits() Use a local variable to hold the base register, 'reg', that is used to read from the device. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- 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; } -- 2.7.4