summaryrefslogtreecommitdiff
path: root/include/linux/iio
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2019-11-13 11:09:38 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2019-11-16 17:31:01 +0000
commita33db9475a3c7b6855c67d144dfa93a623b66cec (patch)
tree0762c87c5509aff4f6d16485304f22471f19cf16 /include/linux/iio
parenta2587eb032f1679dd695b9e5113bcb6b52e46e0a (diff)
iio: adc: max9611: Make enum relations more future proof
The relations between enum values and array indices values are currently not enforced by the code, which makes them fragile w.r.t. future changes. Fix this by: 1. Using designated array initializers, to make sure array indices and enums values match, 2. Linking max9611_csa_gain enum values to the corresponding max9611_conf_ids enum values, as the latter is cast to the former in max9611_read_csa_voltage(). No change in generated code. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Acked-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include/linux/iio')
0 files changed, 0 insertions, 0 deletions