summaryrefslogtreecommitdiffstats
path: root/arch/x86/mach-generic/probe.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-28 13:47:42 +0100
committerIngo Molnar <mingo@elte.hu>2009-01-28 23:20:27 +0100
commit5f836405ef632ba82f4a5261ff2be4198e53b51b (patch)
tree2bae6d0a06330da3232b2eb34240c795b307bba2 /arch/x86/mach-generic/probe.c
parentx86, apic: refactor ->phys_pkg_id() (diff)
downloadlinux-5f836405ef632ba82f4a5261ff2be4198e53b51b.tar.xz
linux-5f836405ef632ba82f4a5261ff2be4198e53b51b.zip
x86, smp: clean up mps_oem_check()
Impact: cleanup - allow NULL ->mps_oem_check() entries - clean up the code flow Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mach-generic/probe.c')
-rw-r--r--arch/x86/mach-generic/probe.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/arch/x86/mach-generic/probe.c b/arch/x86/mach-generic/probe.c
index a21e2b1a7011..799a70f4d90e 100644
--- a/arch/x86/mach-generic/probe.c
+++ b/arch/x86/mach-generic/probe.c
@@ -113,17 +113,21 @@ void __init generic_apic_probe(void)
int __init mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
{
int i;
+
for (i = 0; apic_probe[i]; ++i) {
- if (apic_probe[i]->mps_oem_check(mpc, oem, productid)) {
- if (!cmdline_apic) {
- apic = apic_probe[i];
- if (x86_quirks->update_genapic)
- x86_quirks->update_genapic();
- printk(KERN_INFO "Switched to APIC driver `%s'.\n",
- apic->name);
- }
- return 1;
+ if (!apic_probe[i]->mps_oem_check)
+ continue;
+ if (!apic_probe[i]->mps_oem_check(mpc, oem, productid))
+ continue;
+
+ if (!cmdline_apic) {
+ apic = apic_probe[i];
+ if (x86_quirks->update_genapic)
+ x86_quirks->update_genapic();
+ printk(KERN_INFO "Switched to APIC driver `%s'.\n",
+ apic->name);
}
+ return 1;
}
return 0;
}