diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-05-27 10:30:55 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-28 14:28:54 -0700 |
commit | 3516a5ef16500aa49b4a5ea7a8a2c7147fd2fbfb (patch) | |
tree | 3140be59c33c83a42484cbe90c08a8ec37a2031f | |
parent | c2ccd69aba484ce6d8cfd174a5831a3eb547f2e9 (diff) |
staging: comedi: pcmuio: tidy up local variables in pcmuio_handle_intr_subdev()
Tidy up the local variables so that the comedi_cmd is accessed as a pointer
instead of getting to it from the comedi_subdevice pointer.
Remove the local variable 'len' and use the cmd->chanlist_len directly.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/comedi/drivers/pcmuio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/comedi/drivers/pcmuio.c b/drivers/staging/comedi/drivers/pcmuio.c index 182b48a3e88b..62914bb342d2 100644 --- a/drivers/staging/comedi/drivers/pcmuio.c +++ b/drivers/staging/comedi/drivers/pcmuio.c @@ -317,7 +317,7 @@ static void pcmuio_handle_intr_subdev(struct comedi_device *dev, struct pcmuio_private *devpriv = dev->private; int asic = pcmuio_subdevice_to_asic(s); struct pcmuio_asic *chip = &devpriv->asics[asic]; - unsigned int len = s->async->cmd.chanlist_len; + struct comedi_cmd *cmd = &s->async->cmd; unsigned oldevents = s->async->events; unsigned int val = 0; unsigned long flags; @@ -331,8 +331,8 @@ static void pcmuio_handle_intr_subdev(struct comedi_device *dev, if (!(triggered & chip->enabled_mask)) goto done; - for (i = 0; i < len; i++) { - unsigned int chan = CR_CHAN(s->async->cmd.chanlist[i]); + for (i = 0; i < cmd->chanlist_len; i++) { + unsigned int chan = CR_CHAN(cmd->chanlist[i]); if (triggered & (1 << chan)) val |= (1 << i); } |