提交 500880a8 编写于 作者: H H Hartley Sweeten 提交者: Greg Kroah-Hartman

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: NH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 64592df2
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册