summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJesper Nilsson <jespern@axis.com>2016-09-22 16:03:52 +0200
committerJesper Nilsson <jespern@axis.com>2016-09-22 16:03:52 +0200
commit9d74179a226c83dd610c487a27ac6082b768b074 (patch)
tree655b0e49b0dbfe0bde39ff92d59b2c65097ff1d4 /arch
parent7d1e042314619115153a0f6f06e4552c09a50e13 (diff)
downloadlinux-9d74179a226c83dd610c487a27ac6082b768b074.tar.gz
linux-9d74179a226c83dd610c487a27ac6082b768b074.tar.bz2
linux-9d74179a226c83dd610c487a27ac6082b768b074.zip
cris: intmem: fix device_initcall compile warning
Cannot add __init macro to crisv32_intmem_init, since the function is being called by other functions. Creating a wrapper instead. arch/cris/arch-v32/mm/intmem.c: At top level: arch/cris/arch-v32/mm/intmem.c:148:17: warning: initialization from incompatible pointer type device_initcall(crisv32_intmem_init); ^ include/linux/init.h:184:58: note: in definition of macro ‘__define_initcall’ __attribute__((__section__(".initcall" #id ".init"))) = fn; \ arch/cris/arch-v32/mm/intmem.c:148:1: note: in expansion of macro ‘device_initcall’ device_initcall(crisv32_intmem_init); ^ Signed-off-by: Niklas Cassel <nks@flawful.org> Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/cris/arch-v32/mm/intmem.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/cris/arch-v32/mm/intmem.c b/arch/cris/arch-v32/mm/intmem.c
index 9ef56092a4c5..bad735d46c51 100644
--- a/arch/cris/arch-v32/mm/intmem.c
+++ b/arch/cris/arch-v32/mm/intmem.c
@@ -145,5 +145,12 @@ unsigned long crisv32_intmem_virt_to_phys(void* addr)
(unsigned long)intmem_virtual + MEM_INTMEM_START +
RESERVED_SIZE);
}
-device_initcall(crisv32_intmem_init);
+
+static int __init crisv32_intmem_setup(void)
+{
+ crisv32_intmem_init();
+
+ return 0;
+}
+device_initcall(crisv32_intmem_setup);