Commit 2aba6cac authored by Jean Delvare's avatar Jean Delvare Committed by Jean Delvare

hwmon: (coretemp) Fix for non-SMP builds

The definition of TO_ATTR_NO in the non-SMP case is wrong. As the SMP
definition resolves to the correct value, just use this for both
cases.

Without this fix the temperature attributes are named temp0_* instead
of temp2_*, so libsensors won't pick them. Broken since kernel 3.0.
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
Tested-by: default avatarPhil Sutter <phil@nwl.cc>
Cc: stable@kernel.org
Acked-by: default avatarDurgadoss R <Durgadoss.r@intel.com>
Acked-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
parent c861cd3e
...@@ -60,14 +60,13 @@ MODULE_PARM_DESC(tjmax, "TjMax value in degrees Celsius"); ...@@ -60,14 +60,13 @@ MODULE_PARM_DESC(tjmax, "TjMax value in degrees Celsius");
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
#define TO_PHYS_ID(cpu) cpu_data(cpu).phys_proc_id #define TO_PHYS_ID(cpu) cpu_data(cpu).phys_proc_id
#define TO_CORE_ID(cpu) cpu_data(cpu).cpu_core_id #define TO_CORE_ID(cpu) cpu_data(cpu).cpu_core_id
#define TO_ATTR_NO(cpu) (TO_CORE_ID(cpu) + BASE_SYSFS_ATTR_NO)
#define for_each_sibling(i, cpu) for_each_cpu(i, cpu_sibling_mask(cpu)) #define for_each_sibling(i, cpu) for_each_cpu(i, cpu_sibling_mask(cpu))
#else #else
#define TO_PHYS_ID(cpu) (cpu) #define TO_PHYS_ID(cpu) (cpu)
#define TO_CORE_ID(cpu) (cpu) #define TO_CORE_ID(cpu) (cpu)
#define TO_ATTR_NO(cpu) (cpu)
#define for_each_sibling(i, cpu) for (i = 0; false; ) #define for_each_sibling(i, cpu) for (i = 0; false; )
#endif #endif
#define TO_ATTR_NO(cpu) (TO_CORE_ID(cpu) + BASE_SYSFS_ATTR_NO)
/* /*
* Per-Core Temperature Data * Per-Core Temperature Data
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment