diff options
author | H Hartley Sweeten | 2014-09-10 01:15:36 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2014-09-11 23:35:20 +0200 |
commit | 06f55bb778390f5adbaa21c554505b3a4d27ff38 (patch) | |
tree | c9cc15aa93d706bfc8337a29a7beda3ccc892297 /drivers/staging/comedi | |
parent | staging: comedi: amplc_dio200_common: remove "empty acquisition" async command (diff) | |
download | kernel-qcow2-linux-06f55bb778390f5adbaa21c554505b3a4d27ff38.tar.gz kernel-qcow2-linux-06f55bb778390f5adbaa21c554505b3a4d27ff38.tar.xz kernel-qcow2-linux-06f55bb778390f5adbaa21c554505b3a4d27ff38.zip |
staging: comedi: amplc_dio200_common: 'stopcount' is always 'stop_arg'
When the cmd->stop_src == TRIG_COUNT, the 'stopcount' is the cmd->stop_arg. When
the stop_src == TRIG_NONE the 'stopcount' is 0, which is also the cmd->stop_arg.
Simplify the 'stopcount' initialization.
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/amplc_dio200_common.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/staging/comedi/drivers/amplc_dio200_common.c b/drivers/staging/comedi/drivers/amplc_dio200_common.c index b13f9a2757ad..107e45a89771 100644 --- a/drivers/staging/comedi/drivers/amplc_dio200_common.c +++ b/drivers/staging/comedi/drivers/amplc_dio200_common.c @@ -441,13 +441,9 @@ static int dio200_subdev_intr_cmd(struct comedi_device *dev, int event = 0; spin_lock_irqsave(&subpriv->spinlock, flags); - subpriv->active = true; - /* Set up end of acquisition. */ - if (cmd->stop_src == TRIG_COUNT) - subpriv->stopcount = cmd->stop_arg; - else /* TRIG_NONE */ - subpriv->stopcount = 0; + subpriv->active = true; + subpriv->stopcount = cmd->stop_arg; if (cmd->start_src == TRIG_INT) s->async->inttrig = dio200_inttrig_start_intr; |