From: Bill Carson <bill4car...@gmail.com> It make more sense to copy machine descriptor AFTER machine probe return succeed.
Signed-off-by: Bill Carson <bill4car...@gmail.com> --- arch/powerpc/kernel/setup-common.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index d426b1d..3362097 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c @@ -574,9 +574,9 @@ void probe_machine(void) machine_id < &__machine_desc_end; machine_id++) { DBG(" %s ...", machine_id->name); - memcpy(&ppc_md, machine_id, sizeof(struct machdep_calls)); - if (ppc_md.probe()) { + if (machine_id->probe()) { DBG(" match !\n"); + memcpy(&ppc_md, machine_id, sizeof(struct machdep_calls)); break; } DBG("\n"); -- 1.6.3.1 _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev