Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f836405 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

x86, smp: clean up mps_oem_check()



Impact: cleanup

 - allow NULL ->mps_oem_check() entries

 - clean up the code flow

Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent cb8cc442
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -55,8 +55,7 @@ struct genapic {
	 * is switched to this. Essentially they are additional
	 * probe functions:
	 */
	int (*mps_oem_check)(struct mpc_table *mpc, char *oem,
			     char *productid);
	int (*mps_oem_check)(struct mpc_table *mpc, char *oem, char *productid);

	unsigned int (*get_apic_id)(unsigned long x);
	unsigned long (*set_apic_id)(unsigned int id);
+13 −9
Original line number Diff line number Diff line
@@ -113,8 +113,13 @@ 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 (!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)
@@ -124,7 +129,6 @@ int __init mps_oem_check(struct mpc_table *mpc, char *oem, char *productid)
		}
		return 1;
	}
	}
	return 0;
}