hwmon: (applesmc) Introduce a register lookup table

One main problem with the current driver is the inability to quickly
search for supported keys, resulting in detailed feature maps per
machine model which are cumbersome to maintain.

This patch adds a register lookup table, which enables binary search
for supported keys. The lookup also reduces the io frequency, so the
original mutex is replaced by locks around the actual io.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
[guenter.roeck@ericsson.com: Added value range check to key_at_index_store()]
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
This commit is contained in:
Henrik Rydberg
2010-11-10 10:58:03 +00:00
committed by Guenter Roeck
parent 1ee7c71bd1
commit 5874583d56
+302 -247
View File
File diff suppressed because it is too large Load Diff