summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2014-05-27 10:30:56 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-28 14:28:54 -0700
commitaecbc17285caeae98d5e729d02fdc93ded7a0186 (patch)
treeb791a6b704ecc4c7ef483c3923d0b4036195ad40 /drivers/staging
parent3516a5ef16500aa49b4a5ea7a8a2c7147fd2fbfb (diff)
staging: comedi: pcmmio: use comedi_cmd pointer
Use a local variable to access the comedi_cmd as a pointer instead of getting to from the comedi_subdevice pointer. Remove the unnecessary local variables used for 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')
-rw-r--r--drivers/staging/comedi/drivers/pcmmio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/comedi/drivers/pcmmio.c b/drivers/staging/comedi/drivers/pcmmio.c
index 2d185136db7..76b67a6e8ca 100644
--- a/drivers/staging/comedi/drivers/pcmmio.c
+++ b/drivers/staging/comedi/drivers/pcmmio.c
@@ -339,8 +339,8 @@ static void pcmmio_handle_dio_intr(struct comedi_device *dev,
unsigned int triggered)
{
struct pcmmio_private *devpriv = dev->private;
+ struct comedi_cmd *cmd = &s->async->cmd;
unsigned int oldevents = s->async->events;
- unsigned int len = s->async->cmd.chanlist_len;
unsigned int val = 0;
unsigned long flags;
int i;
@@ -353,8 +353,8 @@ static void pcmmio_handle_dio_intr(struct comedi_device *dev,
if (!(triggered & devpriv->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);