[PATCH] block/floppy: fix section mismatch warnings
authorSam Ravnborg <sam@ravnborg.org>
Sat, 25 Mar 2006 11:07:13 +0000 (03:07 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 25 Mar 2006 16:22:53 +0000 (08:22 -0800)
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 <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/block/floppy.c

index fb2d0be..840919b 100644 (file)
@@ -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);