diff options
author | David S. Miller <davem@davemloft.net> | 2007-12-29 04:19:49 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-12-29 04:19:49 -0500 |
commit | fb445ee5f9bfc7cbef9e397556170c608dc02955 (patch) | |
tree | b1a478362ad1a147c4d2c06ef79f77225953ce99 | |
parent | 1842c7f260dd24dad2dd8eded80904d7a6c5525f (diff) |
[SERIAL]: Fix section mismatches in Sun serial console drivers.
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>
-rw-r--r-- | drivers/serial/suncore.c | 2 | ||||
-rw-r--r-- | kernel/printk.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/serial/suncore.c b/drivers/serial/suncore.c index 707c5b03bce9..a2d4a19550ab 100644 --- a/drivers/serial/suncore.c +++ b/drivers/serial/suncore.c | |||
@@ -52,7 +52,7 @@ void sunserial_unregister_minors(struct uart_driver *drv, int count) | |||
52 | } | 52 | } |
53 | EXPORT_SYMBOL(sunserial_unregister_minors); | 53 | EXPORT_SYMBOL(sunserial_unregister_minors); |
54 | 54 | ||
55 | int __init sunserial_console_match(struct console *con, struct device_node *dp, | 55 | int sunserial_console_match(struct console *con, struct device_node *dp, |
56 | struct uart_driver *drv, int line) | 56 | struct uart_driver *drv, int line) |
57 | { | 57 | { |
58 | int off; | 58 | int off; |
diff --git a/kernel/printk.c b/kernel/printk.c index a30fe33de395..89011bf8c106 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -817,7 +817,7 @@ __setup("console=", console_setup); | |||
817 | * commonly to provide a default console (ie from PROM variables) when | 817 | * commonly to provide a default console (ie from PROM variables) when |
818 | * the user has not supplied one. | 818 | * the user has not supplied one. |
819 | */ | 819 | */ |
820 | int __init add_preferred_console(char *name, int idx, char *options) | 820 | int add_preferred_console(char *name, int idx, char *options) |
821 | { | 821 | { |
822 | struct console_cmdline *c; | 822 | struct console_cmdline *c; |
823 | int i; | 823 | int i; |