hwmon: (coretemp) Use dynamic allocated memory for core temp_data
authorZhang Rui <rui.zhang@intel.com>
Fri, 2 Feb 2024 09:21:44 +0000 (17:21 +0800)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 25 Feb 2024 20:37:37 +0000 (12:37 -0800)
commit1a793caf6f6991716cb07583ed7c27de84ef0cba
tree9fe25964049c0b077f92977b8996f5d47f0fd9c9
parent18b24a5f9ca3f180f0be72b98f170f043a5d8961
hwmon: (coretemp) Use dynamic allocated memory for core temp_data

The total memory needed for saving per core temperature data depends on
the number of cores in a package. Using static allocated memory wastes
memories on systems with low per package core count.

Improve the code to use dynamic allocated memory so that it can be
improved further when per package core count information becomes
available.

No functional change intended.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Link: https://lore.kernel.org/r/20240202092144.71180-12-rui.zhang@intel.com
[groeck: Fixed continuation line alignment]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/coretemp.c