Commit 673e321c authored by Randy Dunlap's avatar Randy Dunlap Committed by Linus Torvalds

[PATCH] char/ip2: more section fixes (replacement)

Priority: tossup.
In theory some of these (previously) __init functions could be called
after init, but that problem has not been observed AFAIK.

There were 2 cases of cleanup_module() (module_exit) calling __init
functions (clear_requested_irq() & have_requested_irq()).
These are more serious, but still not observed AFAIK.

Fix sections mismatch:
WARNING: drivers/char/ip2/ip2main.o - Section mismatch: reference to .init.text: from .text between 'cleanup_module' (at offset 0x228b) and 'ip2_loadmain'
WARNING: drivers/char/ip2/ip2main.o - Section mismatch: reference to .init.text: from .text between 'cleanup_module' (at offset 0x22ae) and 'ip2_loadmain'
WARNING: drivers/char/ip2/ip2main.o - Section mismatch: reference to .init.text: from .text between 'ip2_loadmain' (at offset 0x2501) and 'set_irq'
WARNING: drivers/char/ip2/ip2main.o - Section mismatch: reference to .init.text: from .text between 'ip2_loadmain' (at offset 0x25de) and 'set_irq'
WARNING: drivers/char/ip2/ip2main.o - Section mismatch: reference to .init.text: from .text between 'ip2_loadmain' (at offset 0x2698) and 'set_irq'
WARNING: drivers/char/ip2/ip2main.o - Section mismatch: reference to .init.text: from .text between 'ip2_loadmain' (at offset 0x2922) and 'set_irq'
WARNING: drivers/char/ip2/ip2main.o - Section mismatch: reference to .init.text: from .text between 'ip2_loadmain' (at offset 0x299e) and 'set_irq'
Signed-off-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent cad2af5e
...@@ -305,7 +305,7 @@ static struct class *ip2_class; ...@@ -305,7 +305,7 @@ static struct class *ip2_class;
// Some functions to keep track of what irq's we have // Some functions to keep track of what irq's we have
static int __init static int
is_valid_irq(int irq) is_valid_irq(int irq)
{ {
int *i = Valid_Irqs; int *i = Valid_Irqs;
...@@ -316,14 +316,14 @@ is_valid_irq(int irq) ...@@ -316,14 +316,14 @@ is_valid_irq(int irq)
return (*i); return (*i);
} }
static void __init static void
mark_requested_irq( char irq ) mark_requested_irq( char irq )
{ {
rirqs[iindx++] = irq; rirqs[iindx++] = irq;
} }
#ifdef MODULE #ifdef MODULE
static int __init static int
clear_requested_irq( char irq ) clear_requested_irq( char irq )
{ {
int i; int i;
...@@ -337,7 +337,7 @@ clear_requested_irq( char irq ) ...@@ -337,7 +337,7 @@ clear_requested_irq( char irq )
} }
#endif #endif
static int __init static int
have_requested_irq( char irq ) have_requested_irq( char irq )
{ {
// array init to zeros so 0 irq will not be requested as a side effect // array init to zeros so 0 irq will not be requested as a side effect
...@@ -818,7 +818,7 @@ EXPORT_SYMBOL(ip2_loadmain); ...@@ -818,7 +818,7 @@ EXPORT_SYMBOL(ip2_loadmain);
/* the board, the channel structures are initialized, and the board details */ /* the board, the channel structures are initialized, and the board details */
/* are reported on the console. */ /* are reported on the console. */
/******************************************************************************/ /******************************************************************************/
static void __init static void
ip2_init_board( int boardnum ) ip2_init_board( int boardnum )
{ {
int i; int i;
...@@ -961,7 +961,7 @@ ip2_init_board( int boardnum ) ...@@ -961,7 +961,7 @@ ip2_init_board( int boardnum )
/* EISA motherboard, or no valid board ID is selected it returns 0. Otherwise */ /* EISA motherboard, or no valid board ID is selected it returns 0. Otherwise */
/* it returns the base address of the controller. */ /* it returns the base address of the controller. */
/******************************************************************************/ /******************************************************************************/
static unsigned short __init static unsigned short
find_eisa_board( int start_slot ) find_eisa_board( int start_slot )
{ {
int i, j; int i, j;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment