diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-05-27 17:31:02 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-28 21:28:54 (GMT) |
commit | b727a91f59df86f022f868522fd0d1f9d294ca0b (patch) | |
tree | 8c221fc5a759dbd6aa6ba4599ddde202f4e22dd9 /drivers/staging/comedi | |
parent | 3cd3195251e7c21c2e258f04440483478de3e286 (diff) | |
download | linux-b727a91f59df86f022f868522fd0d1f9d294ca0b.tar.xz |
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: 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/ni_labpc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index c6e914d..3e3f940 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c @@ -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) { struct labpc_private *devpriv = dev->private; - unsigned short data; struct comedi_async *async = dev->read_subdev->async; + struct comedi_cmd *cmd = &async->cmd; + unsigned short data; const int timeout = 10000; unsigned int i; @@ -884,7 +885,7 @@ static int labpc_drain_fifo(struct comedi_device *dev) for (i = 0; (devpriv->stat1 & STAT1_DAVAIL) && i < timeout; i++) { /* 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) break; devpriv->count--; |