aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/coretemp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/coretemp.c')
-rw-r--r--drivers/hwmon/coretemp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index 3b168faee794..05344af50734 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -53,6 +53,7 @@ struct coretemp_data {
53 struct mutex update_lock; 53 struct mutex update_lock;
54 const char *name; 54 const char *name;
55 u32 id; 55 u32 id;
56 u16 core_id;
56 char valid; /* zero until following fields are valid */ 57 char valid; /* zero until following fields are valid */
57 unsigned long last_updated; /* in jiffies */ 58 unsigned long last_updated; /* in jiffies */
58 int temp; 59 int temp;
@@ -75,7 +76,7 @@ static ssize_t show_name(struct device *dev, struct device_attribute
75 if (attr->index == SHOW_NAME) 76 if (attr->index == SHOW_NAME)
76 ret = sprintf(buf, "%s\n", data->name); 77 ret = sprintf(buf, "%s\n", data->name);
77 else /* show label */ 78 else /* show label */
78 ret = sprintf(buf, "Core %d\n", data->id); 79 ret = sprintf(buf, "Core %d\n", data->core_id);
79 return ret; 80 return ret;
80} 81}
81 82
@@ -304,6 +305,9 @@ static int __devinit coretemp_probe(struct platform_device *pdev)
304 } 305 }
305 306
306 data->id = pdev->id; 307 data->id = pdev->id;
308#ifdef CONFIG_SMP
309 data->core_id = c->cpu_core_id;
310#endif
307 data->name = "coretemp"; 311 data->name = "coretemp";
308 mutex_init(&data->update_lock); 312 mutex_init(&data->update_lock);
309 313