diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-05-27 17:30:43 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-28 21:28:52 (GMT) |
commit | a49b45fb498be9c7fd42cccdb1d71fe424c962ca (patch) | |
tree | 8cb4452cd8d203e4fd7b43b8cd2fb5e34b24d952 /drivers/staging/comedi | |
parent | 33938a9dfa67d55aee836172418e4a7705798950 (diff) | |
download | linux-a49b45fb498be9c7fd42cccdb1d71fe424c962ca.tar.xz |
staging: comedi: usbdux: use 'cmd' pointer in usbduxsub_ai_isoc_irq()
Use the 'cmd' pointer to access the chanlist instead of getting to it
using the comedi_subdevice pointer.
Remove the unneeded 'n' local variable, this is just the cmd->chanlist_len.
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>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r-- | drivers/staging/comedi/drivers/usbdux.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/comedi/drivers/usbdux.c b/drivers/staging/comedi/drivers/usbdux.c index e61e4a9..5f65e42 100644 --- a/drivers/staging/comedi/drivers/usbdux.c +++ b/drivers/staging/comedi/drivers/usbdux.c @@ -264,7 +264,7 @@ static void usbduxsub_ai_isoc_irq(struct urb *urb) struct comedi_subdevice *s = dev->read_subdev; struct usbdux_private *devpriv = dev->private; struct comedi_cmd *cmd = &s->async->cmd; - int i, err, n; + int i, err; /* first we test if something unusual has just happened */ switch (urb->status) { @@ -361,9 +361,8 @@ static void usbduxsub_ai_isoc_irq(struct urb *urb) } } /* get the data from the USB bus and hand it over to comedi */ - n = s->async->cmd.chanlist_len; - for (i = 0; i < n; i++) { - unsigned int range = CR_RANGE(s->async->cmd.chanlist[i]); + for (i = 0; i < cmd->chanlist_len; i++) { + unsigned int range = CR_RANGE(cmd->chanlist[i]); uint16_t val = le16_to_cpu(devpriv->in_buf[i]); /* bipolar data is two's-complement */ |