diff options
| author | Ian Abbott <abbotti@mev.co.uk> | 2015-06-05 18:30:07 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-06-12 17:06:39 -0700 |
| commit | fba5963c9259252747f79f778805ca7b368d9000 (patch) | |
| tree | eb3e277e0149f6aec99c6e7331c514a958757955 /tools/perf/scripts/python/syscall-counts.py | |
| parent | d4d794330dd02397f8a34a4db67738f741302df2 (diff) | |
staging: comedi: das08: use indexed initializer for AI range table types
The "das08" common module for DAS08 ISA, PCI, and PCMCIA drivers
includes a predefined set of AI range tables. The static board data (of
type `struct das08_board_struct`) for a particular board contains an
index in its `ai_pg` member (of type `enum das08_lrange`) indicating
which of the predefined AI range tables to use. The "das08" common
module looks up this index in `das08_ai_lranges[]` to get a pointer to
the predefined range table for the board. The same index is also looked
up in `das08_gainlists[]` to get a corresponding pointer to a list of
hardware gain values for each range supported by the board (NULL for
boards without programmable gain).
To make this clearer, used indexed initializers for `das08_ai_lranges[]`
and `das08_gainlists[]`, using the enumerated constants from `enum
das08_lrange` as the indices. Also add a short comment to the
definition of `enum das08_lrange`.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
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
