提交 3d7e0a24 编写于 作者: T Thomas Gleixner 提交者: Guenter Roeck

hwmon: (via-cputemp) Remove pointless CPU check on each CPU

The check loop for the cpu type is pointless as we already have a cpu model
match before that. The only thing which is not covered by that check would
be a smp system with two different cores. Not likely to happen.

Cc: Jean Delvare <jdelvare@suse.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
上级 f4dc811c
......@@ -319,22 +319,8 @@ static int __init via_cputemp_init(void)
goto exit;
cpu_notifier_register_begin();
for_each_online_cpu(i) {
struct cpuinfo_x86 *c = &cpu_data(i);
if (c->x86 != 6)
continue;
if (c->x86_model < 0x0a)
continue;
if (c->x86_model > 0x0f) {
pr_warn("Unknown CPU model 0x%x\n", c->x86_model);
continue;
}
for_each_online_cpu(i)
via_cputemp_device_add(i);
}
#ifndef CONFIG_HOTPLUG_CPU
if (list_empty(&pdev_list)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册