diff options
Diffstat (limited to 'drivers/hwmon/coretemp.c')
-rw-r--r-- | drivers/hwmon/coretemp.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index 7c1795225b06..6f66551d9e51 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c | |||
@@ -47,7 +47,7 @@ typedef enum { SHOW_TEMP, SHOW_TJMAX, SHOW_LABEL, SHOW_NAME } SHOW; | |||
47 | static struct coretemp_data *coretemp_update_device(struct device *dev); | 47 | static struct coretemp_data *coretemp_update_device(struct device *dev); |
48 | 48 | ||
49 | struct coretemp_data { | 49 | struct coretemp_data { |
50 | struct class_device *class_dev; | 50 | struct device *hwmon_dev; |
51 | struct mutex update_lock; | 51 | struct mutex update_lock; |
52 | const char *name; | 52 | const char *name; |
53 | u32 id; | 53 | u32 id; |
@@ -58,8 +58,6 @@ struct coretemp_data { | |||
58 | u8 alarm; | 58 | u8 alarm; |
59 | }; | 59 | }; |
60 | 60 | ||
61 | static struct coretemp_data *coretemp_update_device(struct device *dev); | ||
62 | |||
63 | /* | 61 | /* |
64 | * Sysfs stuff | 62 | * Sysfs stuff |
65 | */ | 63 | */ |
@@ -228,9 +226,9 @@ static int __devinit coretemp_probe(struct platform_device *pdev) | |||
228 | if ((err = sysfs_create_group(&pdev->dev.kobj, &coretemp_group))) | 226 | if ((err = sysfs_create_group(&pdev->dev.kobj, &coretemp_group))) |
229 | goto exit_free; | 227 | goto exit_free; |
230 | 228 | ||
231 | data->class_dev = hwmon_device_register(&pdev->dev); | 229 | data->hwmon_dev = hwmon_device_register(&pdev->dev); |
232 | if (IS_ERR(data->class_dev)) { | 230 | if (IS_ERR(data->hwmon_dev)) { |
233 | err = PTR_ERR(data->class_dev); | 231 | err = PTR_ERR(data->hwmon_dev); |
234 | dev_err(&pdev->dev, "Class registration failed (%d)\n", | 232 | dev_err(&pdev->dev, "Class registration failed (%d)\n", |
235 | err); | 233 | err); |
236 | goto exit_class; | 234 | goto exit_class; |
@@ -250,7 +248,7 @@ static int __devexit coretemp_remove(struct platform_device *pdev) | |||
250 | { | 248 | { |
251 | struct coretemp_data *data = platform_get_drvdata(pdev); | 249 | struct coretemp_data *data = platform_get_drvdata(pdev); |
252 | 250 | ||
253 | hwmon_device_unregister(data->class_dev); | 251 | hwmon_device_unregister(data->hwmon_dev); |
254 | sysfs_remove_group(&pdev->dev.kobj, &coretemp_group); | 252 | sysfs_remove_group(&pdev->dev.kobj, &coretemp_group); |
255 | platform_set_drvdata(pdev, NULL); | 253 | platform_set_drvdata(pdev, NULL); |
256 | kfree(data); | 254 | kfree(data); |
@@ -350,7 +348,7 @@ static int coretemp_cpu_callback(struct notifier_block *nfb, | |||
350 | return NOTIFY_OK; | 348 | return NOTIFY_OK; |
351 | } | 349 | } |
352 | 350 | ||
353 | static struct notifier_block __cpuinitdata coretemp_cpu_notifier = { | 351 | static struct notifier_block coretemp_cpu_notifier = { |
354 | .notifier_call = coretemp_cpu_callback, | 352 | .notifier_call = coretemp_cpu_callback, |
355 | }; | 353 | }; |
356 | #endif /* !CONFIG_HOTPLUG_CPU */ | 354 | #endif /* !CONFIG_HOTPLUG_CPU */ |
@@ -371,9 +369,10 @@ static int __init coretemp_init(void) | |||
371 | for_each_online_cpu(i) { | 369 | for_each_online_cpu(i) { |
372 | struct cpuinfo_x86 *c = &(cpu_data)[i]; | 370 | struct cpuinfo_x86 *c = &(cpu_data)[i]; |
373 | 371 | ||
374 | /* check if family 6, models e, f */ | 372 | /* check if family 6, models e, f, 16 */ |
375 | if ((c->cpuid_level < 0) || (c->x86 != 0x6) || | 373 | if ((c->cpuid_level < 0) || (c->x86 != 0x6) || |
376 | !((c->x86_model == 0xe) || (c->x86_model == 0xf))) { | 374 | !((c->x86_model == 0xe) || (c->x86_model == 0xf) || |
375 | (c->x86_model == 0x16))) { | ||
377 | 376 | ||
378 | /* supported CPU not found, but report the unknown | 377 | /* supported CPU not found, but report the unknown |
379 | family 6 CPU */ | 378 | family 6 CPU */ |