From: Sam Ravnborg Date: Sat, 25 Mar 2006 11:07:13 +0000 (-0800) Subject: [PATCH] block/floppy: fix section mismatch warnings X-Git-Tag: v2.6.17-rc1~822 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1efa64696bc55cc396eefa9838a90d106dfab6bf;p=linux-2.6 [PATCH] block/floppy: fix section mismatch warnings In latest -mm a number of section mismatch warnings are generated for floppy.o like the following: WARNING: drivers/block/floppy.o - Section mismatch: reference to \ .init.data: from .text between 'init_module' (at offset 0x6976) and \ 'cleanup_module' The warning are caused by a reference to floppy_init() which is __init from init_module() which is not declared __init. Declaring init_module() _init fixes this. Signed-off-by: Sam Ravnborg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index fb2d0be7cd..840919bba7 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -4594,7 +4594,7 @@ static void __init parse_floppy_cfg_string(char *cfg) } } -int init_module(void) +int __init init_module(void) { if (floppy) parse_floppy_cfg_string(floppy);