LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Only call ppc_md.setup_arch() if it is provided.
@ 2007-10-08 20:37 Grant Likely
  2007-10-08 20:37 ` [PATCH 2/2] Remove empty ppc_md.setup_arch hooks Grant Likely
  2007-10-08 20:45 ` [PATCH 1/2] Only call ppc_md.setup_arch() if it is provided Kumar Gala
  0 siblings, 2 replies; 3+ messages in thread
From: Grant Likely @ 2007-10-08 20:37 UTC (permalink / raw)
  To: jwboyer, linuxppc-dev

From: Grant Likely <grant.likely@secretlab.ca>

This allows platforms which don't have anything to do at setup_arch time
(like a bunch of the 4xx platforms) to eliminate an empty setup_arch hook.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 arch/powerpc/kernel/setup_32.c |    3 ++-
 arch/powerpc/kernel/setup_64.c |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 7474502..cd870a8 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -290,7 +290,8 @@ void __init setup_arch(char **cmdline_p)
 	conswitchp = &dummy_con;
 #endif
 
-	ppc_md.setup_arch();
+	if (ppc_md.setup_arch)
+		ppc_md.setup_arch();
 	if ( ppc_md.progress ) ppc_md.progress("arch: exit", 0x3eab);
 
 	paging_init();
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 3089eae..008ab68 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -530,7 +530,8 @@ void __init setup_arch(char **cmdline_p)
 	conswitchp = &dummy_con;
 #endif
 
-	ppc_md.setup_arch();
+	if (ppc_md.setup_arch)
+		ppc_md.setup_arch();
 
 	paging_init();
 	ppc64_boot_msg(0x15, "Setup Done");

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-10-08 20:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-08 20:37 [PATCH 1/2] Only call ppc_md.setup_arch() if it is provided Grant Likely
2007-10-08 20:37 ` [PATCH 2/2] Remove empty ppc_md.setup_arch hooks Grant Likely
2007-10-08 20:45 ` [PATCH 1/2] Only call ppc_md.setup_arch() if it is provided Kumar Gala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox