From: Ian Abbott Date: Fri, 5 Jun 2015 17:30:07 +0000 (+0100) Subject: staging: comedi: das08: use indexed initializer for AI range table types X-Git-Tag: omap-for-v4.2/fixes-rc1^2~92^2~219 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fba5963c9259252747f79f778805ca7b368d9000;p=pandora-kernel.git 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 Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed