hwmon: (aquacomputer_d5next) Move device-specific data into struct aqc_data
authorAleksa Savic <savicaleksa83@gmail.com>
Thu, 7 Jul 2022 11:50:50 +0000 (13:50 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 13 Jul 2022 15:39:42 +0000 (08:39 -0700)
commit654c97351baf5e2f00e417291cc9e9caf1d07f4b
treeb521ac5959dd5414ad9f86d86085f97a0a758546
parent1c4e4f4a0e8d9ebe8be1c838fec4fb7053a989d9
hwmon: (aquacomputer_d5next) Move device-specific data into struct aqc_data

As preparation for adding support for more devices in upcoming patches,
move device-specific data, such as number of fans, temperature sensors,
register offsets etc. to struct aqc_data. This is made possible by
the fact that the supported Aquacomputer devices share the same layouts
of sensor substructures. This allows aqc_raw_event() and others to stay
general and not be cluttered with similar loops for each device.

Signed-off-by: Jack Doan <me@jackdoan.com>
Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com>
Link: https://lore.kernel.org/r/20220707115050.90021-1-savicaleksa83@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/aquacomputer_d5next.c