diff options
author | H Hartley Sweeten <[email protected]> | 2014-05-27 10:30:47 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2014-05-28 14:28:52 -0700 |
commit | 71ba7506f05e6512e4b25df2233fa238025399d5 (patch) | |
tree | 1ec162258d4f217449aac99cd7cfc0c4aec9a38b | |
parent | 9dad12fe4746c091ba7304bbd690f4a05fb1216a (diff) |
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: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | drivers/staging/comedi/drivers/amplc_dio200_common.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/comedi/drivers/amplc_dio200_common.c b/drivers/staging/comedi/drivers/amplc_dio200_common.c index 1a580c374ca8..3edaa4028da2 100644 --- a/drivers/staging/comedi/drivers/amplc_dio200_common.c +++ b/drivers/staging/comedi/drivers/amplc_dio200_common.c @@ -312,12 +312,11 @@ static void dio200_read_scan_intr(struct comedi_device *dev, struct dio200_subdev_intr *subpriv = s->private; struct comedi_cmd *cmd = &s->async->cmd; unsigned short val; - unsigned int n, ch, len; + unsigned int n, ch; val = 0; - len = s->async->cmd.chanlist_len; - for (n = 0; n < len; n++) { - ch = CR_CHAN(s->async->cmd.chanlist[n]); + for (n = 0; n < cmd->chanlist_len; n++) { + ch = CR_CHAN(cmd->chanlist[n]); if (triggered & (1U << ch)) val |= (1U << n); } |