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>
 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;
 
        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--;