Message ID | 1413458321-23880-2-git-send-email-haokexin@gmail.com (mailing list archive) |
---|---|
State | Rejected, archived |
Headers | show |
On Thu, 2014-10-16 at 19:18 +0800, Kevin Hao wrote: > So they can be used by ppc64 board. Also remove the unneeded {} to > make checkpatch happy. > > Signed-off-by: Kevin Hao <haokexin@gmail.com> > --- > arch/powerpc/include/asm/machdep.h | 2 +- > arch/powerpc/kernel/setup-common.c | 15 +++++++++++++++ > arch/powerpc/kernel/setup_32.c | 15 --------------- > 3 files changed, 16 insertions(+), 16 deletions(-) This is unnecessary -- why not just use machine_arch_initcall? -Scott
On Thu, Oct 16, 2014 at 11:54:46PM +0200, Scott Wood wrote: > On Thu, 2014-10-16 at 19:18 +0800, Kevin Hao wrote: > > So they can be used by ppc64 board. Also remove the unneeded {} to > > make checkpatch happy. > > > > Signed-off-by: Kevin Hao <haokexin@gmail.com> > > --- > > arch/powerpc/include/asm/machdep.h | 2 +- > > arch/powerpc/kernel/setup-common.c | 15 +++++++++++++++ > > arch/powerpc/kernel/setup_32.c | 15 --------------- > > 3 files changed, 16 insertions(+), 16 deletions(-) > > This is unnecessary -- why not just use machine_arch_initcall? OK, I will drop this patch. Thanks, Kevin
diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h index 307347f8ddbd..4b913d53333b 100644 --- a/arch/powerpc/include/asm/machdep.h +++ b/arch/powerpc/include/asm/machdep.h @@ -213,11 +213,11 @@ struct machdep_calls { int (*set_dawr)(unsigned long dawr, unsigned long dawrx); -#ifdef CONFIG_PPC32 /* XXX for now */ /* A general init function, called by ppc_init in init/main.c. May be NULL. */ void (*init)(void); +#ifdef CONFIG_PPC32 /* XXX for now */ void (*kgdb_map_scc)(void); /* diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 1362cd62b3fa..f76d4a1dbe73 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c @@ -750,3 +750,18 @@ void arch_setup_pdev_archdata(struct platform_device *pdev) pdev->dev.dma_mask = &pdev->archdata.dma_mask; set_dma_ops(&pdev->dev, &dma_direct_ops); } + +int __init ppc_init(void) +{ + /* clear the progress line */ + if (ppc_md.progress) + ppc_md.progress(" ", 0xffff); + + /* call platform init */ + if (ppc_md.init != NULL) + ppc_md.init(); + + return 0; +} + +arch_initcall(ppc_init); diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index 07831ed0d9ef..59d8c6e15782 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c @@ -208,21 +208,6 @@ EXPORT_SYMBOL(nvram_sync); #endif /* CONFIG_NVRAM */ -int __init ppc_init(void) -{ - /* clear the progress line */ - if (ppc_md.progress) - ppc_md.progress(" ", 0xffff); - - /* call platform init */ - if (ppc_md.init != NULL) { - ppc_md.init(); - } - return 0; -} - -arch_initcall(ppc_init); - static void __init irqstack_early_init(void) { unsigned int i;
So they can be used by ppc64 board. Also remove the unneeded {} to make checkpatch happy. Signed-off-by: Kevin Hao <haokexin@gmail.com> --- arch/powerpc/include/asm/machdep.h | 2 +- arch/powerpc/kernel/setup-common.c | 15 +++++++++++++++ arch/powerpc/kernel/setup_32.c | 15 --------------- 3 files changed, 16 insertions(+), 16 deletions(-)