staging: comedi: ni_mio_common: don't change CMDF_WRITE flag
authorIan Abbott <abbotti@mev.co.uk>
Thu, 30 Oct 2014 12:42:28 +0000 (12:42 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Nov 2014 00:28:46 +0000 (16:28 -0800)
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 <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ni_mio_common.c

index 18e68cd3ac5381c12a44e676bce89f0a8d1bdd63..fd61d24bc3a41c36878c901fc27d8ea4aaa87a78 100644 (file)
@@ -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);