hwmon: (coretemp) Split package temp_data and core temp_data
authorZhang Rui <rui.zhang@intel.com>
Fri, 2 Feb 2024 09:21:42 +0000 (17:21 +0800)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 25 Feb 2024 20:37:37 +0000 (12:37 -0800)
commit326241f71f3d8de3c62236b559ce3f2f201aec4d
tree7f1e60780032fa4d11580f03e72b9daf6dc4694e
parentb0b01414a26105b68cbce308df076ec66c72bddd
hwmon: (coretemp) Split package temp_data and core temp_data

Saving package temp_data and core temp_data in one array with different
offsets is fragile.

Split them and clean up crabbed maths and macros. This also fixes a
problem that pdata->core_data[0] was never used.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Link: https://lore.kernel.org/r/20240202092144.71180-10-rui.zhang@intel.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/coretemp.c