]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (pmbus) Improve boolean handling
authorGuenter Roeck <linux@roeck-us.net>
Sun, 20 Jan 2013 18:05:55 +0000 (10:05 -0800)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 6 Feb 2013 17:58:01 +0000 (09:58 -0800)
commite1caa98c0dd59b3c7075ae6afa20f4eba40f122a
tree9494bd7ad43778efe7aa21a70cd84a98b4958300
parent03d8d4d2f897d29822ac1453d6d06a49950da67f
hwmon: (pmbus) Improve boolean handling

Boolean handling depends on storing the sensor data index in sensor_device_attr
as part of the index variable. This limits the number of sensor attributes to
256, and means the sensor sequence number actually has to be maintained to be
able to access sensor data from boolean functions.

Rework the code to store sensor pointers in the pmbus_boolean data structure
directly. With this approach, the number of supportable sensors is now
unlimited.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pmbus/pmbus_core.c