staging: comedi: s626: remove 'ai_continuous' from private data
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 9 Sep 2014 23:16:01 +0000 (16:16 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Sep 2014 21:35:21 +0000 (14:35 -0700)
This member of the private data is set based on the cmd->stop_src. Just use the
cmd->stop_src directly and remove the member.

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>
drivers/staging/comedi/drivers/s626.c

index 051a727a87e9769bde93d17da39e5d226b971845..aac661790dc4a5477b5c26053f56f35988ee15f4 100644 (file)
@@ -78,7 +78,6 @@ struct s626_buffer_dma {
 
 struct s626_private {
        uint8_t ai_cmd_running;         /* ai_cmd is running */
-       uint8_t ai_continuous;          /* continuous acquisition */
        int ai_sample_count;            /* number of samples to acquire */
        unsigned int ai_sample_timer;   /* time between samples in
                                         * units of the timer */
@@ -1502,7 +1501,7 @@ static bool s626_handle_eos_interrupt(struct comedi_device *dev)
        /* end of scan occurs */
        async->events |= COMEDI_CB_EOS;
 
-       if (!devpriv->ai_continuous)
+       if (cmd->stop_src == TRIG_COUNT)
                devpriv->ai_sample_count--;
        if (devpriv->ai_sample_count <= 0) {
                devpriv->ai_cmd_running = 0;
@@ -2106,11 +2105,9 @@ static int s626_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
        case TRIG_COUNT:
                /* data arrives as one packet */
                devpriv->ai_sample_count = cmd->stop_arg;
-               devpriv->ai_continuous = 0;
                break;
        case TRIG_NONE:
                /* continuous acquisition */
-               devpriv->ai_continuous = 1;
                devpriv->ai_sample_count = 1;
                break;
        }