From: H Hartley Sweeten Date: Thu, 14 Jun 2012 00:58:07 +0000 (-0700) Subject: staging: comedi: pcl812: remove unneeded tests in pcl812_ai_cmdtest X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=31a4590ee31f2b46d28a4b85f84b04e90fa7ae00;p=openwrt%2Fstaging%2Fblogic.git staging: comedi: pcl812: remove unneeded tests in pcl812_ai_cmdtest The step 2 tests to make sure that the triggers are unique is not needed for single source triggers. These were already trivially validated in step 1. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Frank Mori Hess Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/pcl812.c b/drivers/staging/comedi/drivers/pcl812.c index 0a4074af8a60..511c90136439 100644 --- a/drivers/staging/comedi/drivers/pcl812.c +++ b/drivers/staging/comedi/drivers/pcl812.c @@ -612,33 +612,6 @@ static int pcl812_ai_cmdtest(struct comedi_device *dev, * unique and mutually compatible */ - if (cmd->start_src != TRIG_NOW) { - cmd->start_src = TRIG_NOW; - err++; - } - - if (cmd->scan_begin_src != TRIG_FOLLOW) { - cmd->scan_begin_src = TRIG_FOLLOW; - err++; - } - - if (devpriv->use_ext_trg) { - if (cmd->convert_src != TRIG_EXT) { - cmd->convert_src = TRIG_EXT; - err++; - } - } else { - if (cmd->convert_src != TRIG_TIMER) { - cmd->convert_src = TRIG_TIMER; - err++; - } - } - - if (cmd->scan_end_src != TRIG_COUNT) { - cmd->scan_end_src = TRIG_COUNT; - err++; - } - if (cmd->stop_src != TRIG_NONE && cmd->stop_src != TRIG_COUNT) err++;