summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2012-09-11 10:47:08 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-11 12:11:04 -0700
commit43b9778eeb789fbfad3ce66da3bbb3440440fbb8 (patch)
treeaabffb058bfbff6eaca7d6ad010af2503ed62de9 /tools/perf/scripts/python/bin
parent13b2663c95f6f30f835ef92ef51c9aff0b3f09d6 (diff)
staging: comedi: comedi_fc: introduce cfc_check_trigger_src
All of the comedi drivers that support the 'cmd' callback also require a 'do_cmdtest' callback. The do_cmdtest validates the comedi_cmd before it is executed. "Step 1" of each do_cmdtest does a trivial validation of the trigger sources by doing something like this for each trigger: int err = 0; unsigned int tmp; tmp = cmd->start_src; src &= TRIG_NOW; if (!src || tmp != src) err++; /* Test the remaining triggers similarly */ if (err) return 1; Introduce a helper function in comedi_fc to handle this boilerplate. The drivers can then just do: err |= cfc_check_trigger_src(&cmd->start_src, TRIG_NOW); /* Test the remaining triggers similarly */ if (err) return 1; 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 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions