comedi/comedi_fops.c: Check length of INSN_CONFIG_DIGITAL_TRIG data
authorIan Abbott <abbotti@mev.co.uk>
Thu, 21 Mar 2013 16:21:52 +0000 (16:21 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Thu, 21 Mar 2013 16:21:52 +0000 (16:21 +0000)
`check_insn_config_length()` checks the data length for instructions we
know about.  Expect 6 data values for the INSN_CONFIG_DIGITAL_TRIG
instruction.  None of our drivers support this instruction yet.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
comedi/comedi_fops.c

index 2a7499be1a519a8c1a7393e58f4e4b5571533ed1..e34b6e1b255f0a813da841110af682d66760aeed 100644 (file)
@@ -812,6 +812,10 @@ static int check_insn_config_length(comedi_insn * insn, lsampl_t * data)
                if (insn->n == 5)
                        return 0;
                break;
+       case INSN_CONFIG_DIGITAL_TRIG:
+               if (insn->n == 6)
+                       return 0;
+               break;
                //by default we allow the insn since we don't have checks for all possible cases yet
        default:
                rt_printk