Skip to contentSkip to conversation

sh4: make the bios early console support depend on EARLY_PRINTK

PATCH-mmotm Paul Gortmaker 1 participant 1 message Apr 3, 2013 SuperH

lore
Share & tools
lore
#0 lore raw

The commit "early_printk: consolidate random copies of identical code" introduces a build failure for the lboxre2_defconfig because arch/sh unconditionally assumes that there will be an early_console struct present that it can populate with bios routines to drive the early printk support.

Making this whole block conditional on EARLY_PRINTK solves the problem and gets rid of unused runtime code for when the feature is disabled at the same time.

---

Related mmotm patches:
* early_printk-consolidate-random-copies-of-identical-code.patch
* early_printk-consolidate-random-copies-of-identical-code-v3.patch
* early_printk-consolidate-random-copies-of-identical-code-v3-fix.patch
* include-linux-printkh-include-stdargh.patch

 arch/sh/kernel/sh_bios.c | 2 ++
 1 file changed, 2 insertions(+)
arch/sh/kernel/sh_bios.c +2 -0
index a5b51b9..fe584e5 100644
@@ -104,6 +104,7 @@ void sh_bios_vbr_reload(void)
 		);
 }
 
+#ifdef CONFIG_EARLY_PRINTK
 /*
  *	Print a string through the BIOS
  */
@@ -168,3 +169,4 @@ static int __init setup_early_printk(char *buf)
 	return 0;
 }
 early_param("earlyprintk", setup_early_printk);
+#endif
Signature · 1 line
1.8.1.2