From d95e19281d092b0845dbd7cd3c053c40d96774f2 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Mon, 13 Sep 2010 10:18:54 +0000 Subject: [PATCH] --- yaml --- r: 210986 b: refs/heads/master c: f6aeccdb96fc0555e939dd507702922f07dcbcbb h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/hwmon/pkgtemp.c | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index fbcded54db5a..20c454c7641f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a46590533ad7b0f3f640732081d7e1658145c0ba +refs/heads/master: f6aeccdb96fc0555e939dd507702922f07dcbcbb diff --git a/trunk/drivers/hwmon/pkgtemp.c b/trunk/drivers/hwmon/pkgtemp.c index f7ddee5fe9d5..ab89f23eebdf 100644 --- a/trunk/drivers/hwmon/pkgtemp.c +++ b/trunk/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;