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

staging: comedi: ni_labpc: use comedi_cmd pointer

Use a local variable to access the comedi_cmd as a pointer instead
of getting to from the comedi_async 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 3cd31952
...@@ -874,8 +874,9 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) ...@@ -874,8 +874,9 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
static int labpc_drain_fifo(struct comedi_device *dev) static int labpc_drain_fifo(struct comedi_device *dev)
{ {
struct labpc_private *devpriv = dev->private; struct labpc_private *devpriv = dev->private;
unsigned short data;
struct comedi_async *async = dev->read_subdev->async; struct comedi_async *async = dev->read_subdev->async;
struct comedi_cmd *cmd = &async->cmd;
unsigned short data;
const int timeout = 10000; const int timeout = 10000;
unsigned int i; unsigned int i;
...@@ -884,7 +885,7 @@ static int labpc_drain_fifo(struct comedi_device *dev) ...@@ -884,7 +885,7 @@ static int labpc_drain_fifo(struct comedi_device *dev)
for (i = 0; (devpriv->stat1 & STAT1_DAVAIL) && i < timeout; for (i = 0; (devpriv->stat1 & STAT1_DAVAIL) && i < timeout;
i++) { i++) {
/* quit if we have all the data we want */ /* quit if we have all the data we want */
if (async->cmd.stop_src == TRIG_COUNT) { if (cmd->stop_src == TRIG_COUNT) {
if (devpriv->count == 0) if (devpriv->count == 0)
break; break;
devpriv->count--; devpriv->count--;
......
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