提交 71ba7506 编写于 作者: H H Hartley Sweeten 提交者: Greg Kroah-Hartman

staging: comedi: amplc_dio200_common: use comedi_cmd pointer

Use the local variable to access the comedi_cmd as a pointer
in dio200_read_scan_intr() instead of getting to it from the
comedi_subdevice pointer.

Remove the unnecessary local variable 'len', this is just the
cmd->chanlist_len.
Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: NIan Abbott <abbotti@mev.co.uk>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 9dad12fe
...@@ -312,12 +312,11 @@ static void dio200_read_scan_intr(struct comedi_device *dev, ...@@ -312,12 +312,11 @@ static void dio200_read_scan_intr(struct comedi_device *dev,
struct dio200_subdev_intr *subpriv = s->private; struct dio200_subdev_intr *subpriv = s->private;
struct comedi_cmd *cmd = &s->async->cmd; struct comedi_cmd *cmd = &s->async->cmd;
unsigned short val; unsigned short val;
unsigned int n, ch, len; unsigned int n, ch;
val = 0; val = 0;
len = s->async->cmd.chanlist_len; for (n = 0; n < cmd->chanlist_len; n++) {
for (n = 0; n < len; n++) { ch = CR_CHAN(cmd->chanlist[n]);
ch = CR_CHAN(s->async->cmd.chanlist[n]);
if (triggered & (1U << ch)) if (triggered & (1U << ch))
val |= (1U << n); val |= (1U << n);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册