]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[SERIAL]: Fix section mismatches in Sun serial console drivers.
authorDavid S. Miller <davem@davemloft.net>
Sat, 29 Dec 2007 09:19:49 +0000 (01:19 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 29 Dec 2007 09:19:49 +0000 (01:19 -0800)
We're exporting an __init function, oops :-)

The core issue here is that add_preferred_console() is marked
as __init, this makes it impossible to invoke this thing from
a driver probe routine which is what the Sparc serial drivers
need to do.

There is no harm in dropping the __init marker.  This code will
actually work properly when invoked from a modular driver,
except that init will probably not pick up the console change
without some other support code.

Then we can drop the __init from sunserial_console_match()
and we're no longer exporting an __init function to modules.

Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/serial/suncore.c
kernel/printk.c

index 707c5b03bce92c1694f62721bbfe455a405b98bb..a2d4a19550ab9be4c5fbf99abf93c7e68e248ee1 100644 (file)
@@ -52,7 +52,7 @@ void sunserial_unregister_minors(struct uart_driver *drv, int count)
 }
 EXPORT_SYMBOL(sunserial_unregister_minors);
 
-int __init sunserial_console_match(struct console *con, struct device_node *dp,
+int sunserial_console_match(struct console *con, struct device_node *dp,
                            struct uart_driver *drv, int line)
 {
        int off;
index a30fe33de395a7964f68e237c73de7344190b18a..89011bf8c106615cf3569a3f1f80777afe3e55ef 100644 (file)
@@ -817,7 +817,7 @@ __setup("console=", console_setup);
  * commonly to provide a default console (ie from PROM variables) when
  * the user has not supplied one.
  */
-int __init add_preferred_console(char *name, int idx, char *options)
+int add_preferred_console(char *name, int idx, char *options)
 {
        struct console_cmdline *c;
        int i;