]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Fix undefined ioremap_huge_init when CONFIG_MMU is not set
authorToshi Kani <toshi.kani@hp.com>
Tue, 7 Apr 2015 23:44:14 +0000 (09:44 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 7 Apr 2015 23:44:14 +0000 (09:44 +1000)
Fix a build error, undefined reference to ioremap_huge_init, when
CONFIG_MMU is not defined on linux-next and -mm tree.

lib/ioremap.o is not linked to the kernel when CONFIG_MMU is not
defined.

Signed-off-by: Toshi Kani <toshi.kani@hp.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Fengguang Wu <fengguang.wu@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/io.h
lib/ioremap.c

index 1ce8b4e984c977df2b11d0593278fd9349dc1e35..4cc299c598e0309919fe7e70162efba6a2a355e3 100644 (file)
@@ -38,11 +38,12 @@ static inline int ioremap_page_range(unsigned long addr, unsigned long end,
 }
 #endif
 
-void __init ioremap_huge_init(void);
-
 #ifdef CONFIG_HAVE_ARCH_HUGE_VMAP
+void __init ioremap_huge_init(void);
 int arch_ioremap_pud_supported(void);
 int arch_ioremap_pmd_supported(void);
+#else
+static inline void ioremap_huge_init(void) { }
 #endif
 
 /*
index 0ce18aacd4b14ceb8592a61b6e5f68d269ce68c0..2008652c9a1f5c5c59aabd5c7de39a59e22c55da 100644 (file)
@@ -46,7 +46,6 @@ static inline int ioremap_pmd_enabled(void)
 }
 
 #else  /* !CONFIG_HAVE_ARCH_HUGE_VMAP */
-void __init ioremap_huge_init(void) { }
 static inline int ioremap_pud_enabled(void) { return 0; }
 static inline int ioremap_pmd_enabled(void) { return 0; }
 #endif /* CONFIG_HAVE_ARCH_HUGE_VMAP */