diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-02-10 23:20:34 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-14 18:31:30 +0100 |
commit | f45cc79ae58ba78f9e7f203f1c7c203b8acb5556 (patch) | |
tree | a3509e37364052a0820d462a914ef922ef913e19 /drivers | |
parent | staging: comedi: cb_pcidas: trigger sources are validated in (*do_cmdtest) (diff) | |
download | linux-f45cc79ae58ba78f9e7f203f1c7c203b8acb5556.tar.xz linux-f45cc79ae58ba78f9e7f203f1c7c203b8acb5556.zip |
staging: comedi: comedi_test: trigger sources are validated in (*do_cmdtest)
The trigger sources were already validataed in the (*do_cmdtest) before the
(*do_cmd) is called. Refactor the code in waveform_ai_cmd() to remove the
final else which can never be reached.
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/comedi/drivers/comedi_test.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/staging/comedi/drivers/comedi_test.c b/drivers/staging/comedi/drivers/comedi_test.c index d539eaf53b63..3f596669d07a 100644 --- a/drivers/staging/comedi/drivers/comedi_test.c +++ b/drivers/staging/comedi/drivers/comedi_test.c @@ -318,12 +318,8 @@ static int waveform_ai_cmd(struct comedi_device *dev, if (cmd->convert_src == TRIG_NOW) devpriv->convert_period = 0; - else if (cmd->convert_src == TRIG_TIMER) + else /* TRIG_TIMER */ devpriv->convert_period = cmd->convert_arg / nano_per_micro; - else { - comedi_error(dev, "bug setting conversion period"); - return -1; - } do_gettimeofday(&devpriv->last); devpriv->usec_current = devpriv->last.tv_usec % devpriv->usec_period; |