diff options
| author | H Hartley Sweeten <[email protected]> | 2012-11-13 17:48:03 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2012-11-14 16:23:01 -0800 |
| commit | 61ca8bac45ea2fb263b3a7229e00f040df166501 (patch) | |
| tree | a950eaa17603aa3ece06bd312093495299df90af /tools/perf/scripts/python/syscall-counts.py | |
| parent | 1f168dbdf731dea301a297e2409adc4a54ed6612 (diff) | |
staging: comedi: comedi_fc.h: introduce new helpers for do_cmdtest step 3
Step 3 of the do_cmdtest functions validates the arguments for the
command to be executed. Most of these are simple tests to see if the
argument "is" a value, a "min" value, or a "max" value. Each of these
tests then clamps the argument to the value if it fails the test.
Introduce three new helper functions in comedi_fc.h to handle these
tests and remove the boilerplate code from the drivers.
The new helper functions are:
cfc_check_trigger_arg_is() - argument must be == the value
cfc_check_trigger_arg_min() - argument must be >= the value
cfc_check_trigger_arg_max() - argument must be <= the value
All of these helpers set the argument to the value and return -EINVAL
if the validation fails.
Signed-off-by: H Hartley Sweeten <[email protected]>
Cc: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions