From: Ian Abbott Date: Thu, 30 Oct 2014 12:42:28 +0000 (+0000) Subject: staging: comedi: ni_mio_common: don't change CMDF_WRITE flag X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fb5a88eb9c2e20e2a68caea7ebebab65d2a13cd1;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git staging: comedi: ni_mio_common: don't change CMDF_WRITE flag There is no need for `ni_ai_cmdtest()` or `ni_ao_cmdtest()` to set the `CMDF_WRITE` flag to the correct state as it has already been done by the core comedi module. Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c index 18e68cd3ac53..fd61d24bc3a4 100644 --- a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c @@ -2237,9 +2237,6 @@ static int ni_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s, /* Step 1 : check if triggers are trivially valid */ - if ((cmd->flags & CMDF_WRITE)) - cmd->flags &= ~CMDF_WRITE; - err |= cfc_check_trigger_src(&cmd->start_src, TRIG_NOW | TRIG_INT | TRIG_EXT); err |= cfc_check_trigger_src(&cmd->scan_begin_src, @@ -3272,9 +3269,6 @@ static int ni_ao_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s, /* Step 1 : check if triggers are trivially valid */ - if ((cmd->flags & CMDF_WRITE) == 0) - cmd->flags |= CMDF_WRITE; - err |= cfc_check_trigger_src(&cmd->start_src, TRIG_INT | TRIG_EXT); err |= cfc_check_trigger_src(&cmd->scan_begin_src, TRIG_TIMER | TRIG_EXT);