aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal/x86_pkg_temp_thermal.c
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2014-03-02 09:05:49 -0500
committerZhang Rui <rui.zhang@intel.com>2014-03-03 10:13:37 -0500
commit3e4216531c442ea99cb32a69e5ef4af723e7b5a9 (patch)
treeafb8c75e3c33f0a22c694e2678a9fe3046153509 /drivers/thermal/x86_pkg_temp_thermal.c
parent79786880a47a8c5b4c8146c03432b3387a07a169 (diff)
x86_pkg_temp_thermal: Fix the thermal zone type
The thermal zone type should not include an instance number. Otherwise each zone is considered a different type and the thermal-to-hwmon bridge fails to group them all in a single hwmon device. I also changed the type to "x86_pkg_temp", because "pkg" was too generic, and other thermal drivers use an underscore, not a dash, as a separator. Or maybe "cpu_pkg_temp" would be better? Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'drivers/thermal/x86_pkg_temp_thermal.c')
-rw-r--r--drivers/thermal/x86_pkg_temp_thermal.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/thermal/x86_pkg_temp_thermal.c b/drivers/thermal/x86_pkg_temp_thermal.c
index 3d8d97232c62..081fd7e6a9f0 100644
--- a/drivers/thermal/x86_pkg_temp_thermal.c
+++ b/drivers/thermal/x86_pkg_temp_thermal.c
@@ -398,7 +398,6 @@ static int pkg_temp_thermal_device_add(unsigned int cpu)
398 int err; 398 int err;
399 u32 tj_max; 399 u32 tj_max;
400 struct phy_dev_entry *phy_dev_entry; 400 struct phy_dev_entry *phy_dev_entry;
401 char buffer[30];
402 int thres_count; 401 int thres_count;
403 u32 eax, ebx, ecx, edx; 402 u32 eax, ebx, ecx, edx;
404 u8 *temp; 403 u8 *temp;
@@ -444,9 +443,7 @@ static int pkg_temp_thermal_device_add(unsigned int cpu)
444 phy_dev_entry->first_cpu = cpu; 443 phy_dev_entry->first_cpu = cpu;
445 phy_dev_entry->tj_max = tj_max; 444 phy_dev_entry->tj_max = tj_max;
446 phy_dev_entry->ref_cnt = 1; 445 phy_dev_entry->ref_cnt = 1;
447 snprintf(buffer, sizeof(buffer), "pkg-temp-%d\n", 446 phy_dev_entry->tzone = thermal_zone_device_register("x86_pkg_temp",
448 phy_dev_entry->phys_proc_id);
449 phy_dev_entry->tzone = thermal_zone_device_register(buffer,
450 thres_count, 447 thres_count,
451 (thres_count == MAX_NUMBER_OF_TRIPS) ? 448 (thres_count == MAX_NUMBER_OF_TRIPS) ?
452 0x03 : 0x01, 449 0x03 : 0x01,