Commit ae2348e2 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: pcl711: 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.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b5fc9c10
...@@ -202,6 +202,7 @@ static irqreturn_t pcl711_interrupt(int irq, void *d) ...@@ -202,6 +202,7 @@ static irqreturn_t pcl711_interrupt(int irq, void *d)
struct comedi_device *dev = d; struct comedi_device *dev = d;
struct pcl711_private *devpriv = dev->private; struct pcl711_private *devpriv = dev->private;
struct comedi_subdevice *s = dev->read_subdev; struct comedi_subdevice *s = dev->read_subdev;
struct comedi_cmd *cmd = &s->async->cmd;
unsigned int data; unsigned int data;
if (!dev->attached) { if (!dev->attached) {
...@@ -217,8 +218,7 @@ static irqreturn_t pcl711_interrupt(int irq, void *d) ...@@ -217,8 +218,7 @@ static irqreturn_t pcl711_interrupt(int irq, void *d)
s->async->events |= COMEDI_CB_OVERFLOW | COMEDI_CB_ERROR; s->async->events |= COMEDI_CB_OVERFLOW | COMEDI_CB_ERROR;
} else { } else {
s->async->events |= COMEDI_CB_BLOCK | COMEDI_CB_EOS; s->async->events |= COMEDI_CB_BLOCK | COMEDI_CB_EOS;
if (s->async->cmd.stop_src == TRIG_COUNT && if (cmd->stop_src == TRIG_COUNT && !(--devpriv->ntrig)) {
!(--devpriv->ntrig)) {
pcl711_ai_set_mode(dev, PCL711_MODE_SOFTTRIG); pcl711_ai_set_mode(dev, PCL711_MODE_SOFTTRIG);
s->async->events |= COMEDI_CB_EOA; s->async->events |= COMEDI_CB_EOA;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment