diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2012-09-11 10:48:10 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-11 12:11:04 -0700 |
commit | 6c39eed00cb28d4997ddf3a7aa96a1aff48c8828 (patch) | |
tree | 514997ae002e652f605da530387c5fce4a1d2d4e /tools/perf/scripts/python/syscall-counts.py | |
parent | 6be4173b02f85fa3d2f8610b79ea276eea86c3ac (diff) |
staging: comedi: comedi_fc: introduce cfc_check_trigger_is_unique
"Step 2" of each do_cmdtest checks that the trigger sources are
unique by doing something like this for each trigger:
if (cmd->start_src != TRIG_TIMER &&
cmd->start_src != TRIG_FOLLOW &&
cmd->start_src != TRIG_EXT)
err++;
/* Test the remaining triggers similarly */
if (err)
return 2;
Introduce a helper function in comedi_fc to handle this boilerplate.
The drivers can then just do:
err |= cfc_check_trigger_is_unique(cmd->start_src);
/* Test the remaining triggers similarly */
if (err)
return 2;
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/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions