hwmon: (asus-ec-sensors) introduce ec_board_info struct for board data
authorEugene Shalygin <eugene.shalygin@gmail.com>
Wed, 27 Apr 2022 14:29:58 +0000 (16:29 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 20 May 2022 17:57:06 +0000 (10:57 -0700)
commit5cd29012028d997f46518dae0a8133e0985713f3
tree3e5b5170f1c439fc9efb153ef22f84141cea515a
parent849b0156d9960da628a06756bb920d9571c15e66
hwmon: (asus-ec-sensors) introduce ec_board_info struct for board data

We need to keep some more information about the current board than just
the sensors set, and with more boards to add the dmi id array grows
quickly. Our probe code is always the same so let's switch to a custom
test code and a custom board info array. That allows us to omit board
vendor string (ASUS uses two strings that differ in case) in the board
info and use case-insensitive comparison, and also do not duplicate
sensor definitions for such board variants as " (WI-FI)" when sensors
are identical to the base variant.

Also saves a quarter of the module size by replacing big dmi_system_id
structs with smaller ones.

Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com>
Link: https://lore.kernel.org/r/20220427143001.1443605-2-eugene.shalygin@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/asus-ec-sensors.c