diff options
| author | H Hartley Sweeten <[email protected]> | 2016-03-22 11:10:35 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2016-03-28 07:30:36 -0700 |
| commit | 0c9434e352d0ae9ddb84a89716e1d1e82f3185f1 (patch) | |
| tree | 717c7c6c6273c616bfd91aa84a3f69d196c676d7 /tools/perf/scripts/python | |
| parent | f0c9305ede52b42021ea53a33b3a2878e0c5d51e (diff) | |
staging: comedi: ni_660x: refactor ni_gpct_to_660x_register()
Convert this big switch into an array and refactor ni_660x_gpct_{write,read}()
functions to use the array to find the register offset.
All the TIO (GPCT) registers are included in the array except for NITIO_G0_ABZ
and NITIO_G1_ABZ. These registers only exist on the ni_pcimio m-series boards
and this driver will never read/write them.
Just in case someone adds a new entry to the enum ni_gpct_register in ni_tio.h,
add a dev_warn() for any unhandled registers.
Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions