提交 9d74179a 编写于 作者: J Jesper Nilsson

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: NNiklas Cassel <nks@flawful.org>
Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
上级 7d1e0423
......@@ -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);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册