projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a465905
)
x86/hwmon: fix initialization of pkgtemp
author
Jan Beulich
<
[email protected]
>
Mon, 13 Sep 2010 10:18:54 +0000
(10:18 +0000)
committer
Guenter Roeck
<
[email protected]
>
Fri, 24 Sep 2010 18:44:19 +0000
(11:44 -0700)
Feature availability should also be checked in the hotplug code path.
Signed-off-by: Jan Beulich <
[email protected]
>
Cc: Fenghua Yu <
[email protected]
>
Signed-off-by: Guenter Roeck <
[email protected]
>
drivers/hwmon/pkgtemp.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/pkgtemp.c
b/drivers/hwmon/pkgtemp.c
index f7ddee5fe9d5b17d7b90fd6b91d17249f4ff8ede..ab89f23eebdfb81fcaa68e3abe9f557559b9213b 100644
(file)
--- a/
drivers/hwmon/pkgtemp.c
+++ b/
drivers/hwmon/pkgtemp.c
@@
-284,9
+284,10
@@
static int __cpuinit pkgtemp_device_add(unsigned int cpu)
int err;
struct platform_device *pdev;
struct pdev_entry *pdev_entry;
-#ifdef CONFIG_SMP
struct cpuinfo_x86 *c = &cpu_data(cpu);
-#endif
+
+ if (!cpu_has(c, X86_FEATURE_PTS))
+ return 0;
mutex_lock(&pdev_list_mutex);
@@
-403,11
+404,6
@@
static int __init pkgtemp_init(void)
goto exit;
for_each_online_cpu(i) {
- struct cpuinfo_x86 *c = &cpu_data(i);
-
- if (!cpu_has(c, X86_FEATURE_PTS))
- continue;
-
err = pkgtemp_device_add(i);
if (err)
goto exit_devices_unreg;