diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-02-10 23:20:30 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-14 18:31:30 +0100 |
commit | 9ebe26cf7acf40391afb6caa4d38bb9cc83a27f0 (patch) | |
tree | cf6d9e62f61b909fa1d18911b5454a14328bf079 | |
parent | staging: comedi: usbduxfast: 'cmd->chanlist_len' was already validataed (diff) | |
download | linux-9ebe26cf7acf40391afb6caa4d38bb9cc83a27f0.tar.xz linux-9ebe26cf7acf40391afb6caa4d38bb9cc83a27f0.zip |
staging: comedi: usbduxfast: remove TRIG_TIMER from scan_begin_src
Currently the (*do_cmdtest) indicates that TRIG_TIMER is a valid scan_begin_src
but later this source is tested as -EINVAL. To simplify the code a bit just
remove the TRIG_TIMER source.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/comedi/drivers/usbduxfast.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/staging/comedi/drivers/usbduxfast.c b/drivers/staging/comedi/drivers/usbduxfast.c index 4a927e44cb0a..d6fae11ee4e0 100644 --- a/drivers/staging/comedi/drivers/usbduxfast.c +++ b/drivers/staging/comedi/drivers/usbduxfast.c @@ -372,7 +372,7 @@ static int usbduxfast_ai_cmdtest(struct comedi_device *dev, err |= cfc_check_trigger_src(&cmd->start_src, TRIG_NOW | TRIG_EXT | TRIG_INT); err |= cfc_check_trigger_src(&cmd->scan_begin_src, - TRIG_TIMER | TRIG_FOLLOW | TRIG_EXT); + TRIG_FOLLOW | TRIG_EXT); err |= cfc_check_trigger_src(&cmd->convert_src, TRIG_TIMER | TRIG_EXT); err |= cfc_check_trigger_src(&cmd->scan_end_src, TRIG_COUNT); err |= cfc_check_trigger_src(&cmd->stop_src, TRIG_COUNT | TRIG_NONE); @@ -424,9 +424,6 @@ static int usbduxfast_ai_cmdtest(struct comedi_device *dev, err |= cfc_check_trigger_arg_is(&cmd->convert_arg, tmp); } - if (cmd->scan_begin_src == TRIG_TIMER) - err |= -EINVAL; - /* stop source */ switch (cmd->stop_src) { case TRIG_COUNT: @@ -536,12 +533,6 @@ static int usbduxfast_ai_cmd(struct comedi_device *dev, } } steps = 0; - if (cmd->scan_begin_src == TRIG_TIMER) { - dev_err(dev->class_dev, - "scan_begin_src==TRIG_TIMER not valid\n"); - up(&devpriv->sem); - return -EINVAL; - } if (cmd->convert_src == TRIG_TIMER) steps = (cmd->convert_arg * 30) / 1000; |