]> err.no Git - linux-2.6/commitdiff
[POWERPC] Only call ppc_md.setup_arch() if it is provided
authorGrant Likely <grant.likely@secretlab.ca>
Wed, 10 Oct 2007 18:48:18 +0000 (04:48 +1000)
committerPaul Mackerras <paulus@samba.org>
Thu, 11 Oct 2007 10:39:36 +0000 (20:39 +1000)
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>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/setup_32.c
arch/powerpc/kernel/setup_64.c
include/asm-powerpc/machdep.h

index 7474502dace5880cabc5046c49d5e3c7441481f9..cd870a823d18a89952d4b9d622bb080e3b5ffc5b 100644 (file)
@@ -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();
index 3089eaed3256c7dda38f6922679cfeef57693019..008ab6823b022a1793259b62697008f15feb90d5 100644 (file)
@@ -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");
index 71c6e7eb2a266798d56e3c6676d528fa1fa8be3f..cc7c17f16a9a71a2699d577ff644e63141ba5c32 100644 (file)
@@ -99,7 +99,7 @@ struct machdep_calls {
 #endif /* CONFIG_PPC64 */
 
        int             (*probe)(void);
-       void            (*setup_arch)(void);
+       void            (*setup_arch)(void); /* Optional, may be NULL */
        void            (*init_early)(void);
        /* Optional, may be NULL. */
        void            (*show_cpuinfo)(struct seq_file *m);