From: H Hartley Sweeten Date: Tue, 9 Sep 2014 23:16:01 +0000 (-0700) Subject: staging: comedi: s626: remove 'ai_continuous' from private data X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e37b20aa58d8b6e4df41222f4aacf2b055c973b2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging: comedi: s626: remove 'ai_continuous' from private data 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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c index 051a727a87e9..aac661790dc4 100644 --- a/drivers/staging/comedi/drivers/s626.c +++ b/drivers/staging/comedi/drivers/s626.c @@ -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; }