]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (w83795) Use 2D arrays for many device attributes
authorJean Delvare <khali@linux-fr.org>
Thu, 28 Oct 2010 18:31:45 +0000 (20:31 +0200)
committerJean Delvare <khali@endymion.delvare>
Thu, 28 Oct 2010 18:31:45 +0000 (20:31 +0200)
commitb074b0ceb60624ab151219f628dcde20e64029d0
tree60b5be6938e3050ce7a117a26aa407f6315d3d0c
parent04fd5f748da7f7f18b857f3249d2b1bd8b833ce2
hwmon: (w83795) Use 2D arrays for many device attributes

Use 2D arrays for in, fan, temp and dts device attributes. Using
linear arrays is too risky as we have to skip some groups depending
on the device model and configuration. Adding or removing an
attribute would let the driver build silently but then it would crash
at runtime. With 2D arrays, the consistency checking happens at build
time, which is much safer.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/hwmon/w83795.c