mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-06 22:58:29 +00:00
x86/hwmon: fix initialization of pkgtemp
Feature availability should also be checked in the hotplug code path. Signed-off-by: Jan Beulich <jbeulich@novell.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
This commit is contained in:
parent
a46590533a
commit
f6aeccdb96
1 changed files with 3 additions and 7 deletions
|
@ -284,9 +284,10 @@ static int __cpuinit pkgtemp_device_add(unsigned int cpu)
|
||||||
int err;
|
int err;
|
||||||
struct platform_device *pdev;
|
struct platform_device *pdev;
|
||||||
struct pdev_entry *pdev_entry;
|
struct pdev_entry *pdev_entry;
|
||||||
#ifdef CONFIG_SMP
|
|
||||||
struct cpuinfo_x86 *c = &cpu_data(cpu);
|
struct cpuinfo_x86 *c = &cpu_data(cpu);
|
||||||
#endif
|
|
||||||
|
if (!cpu_has(c, X86_FEATURE_PTS))
|
||||||
|
return 0;
|
||||||
|
|
||||||
mutex_lock(&pdev_list_mutex);
|
mutex_lock(&pdev_list_mutex);
|
||||||
|
|
||||||
|
@ -403,11 +404,6 @@ static int __init pkgtemp_init(void)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
for_each_online_cpu(i) {
|
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);
|
err = pkgtemp_device_add(i);
|
||||||
if (err)
|
if (err)
|
||||||
goto exit_devices_unreg;
|
goto exit_devices_unreg;
|
||||||
|
|
Loading…
Add table
Reference in a new issue