diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2008-02-06 18:23:41 +0100 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2008-02-06 18:23:41 +0100 |
commit | 3de66a175d2014246a2e990412e5750922e5c7d8 (patch) | |
tree | fb30686420b85296fc0e769ebee2feb60281b66e /drivers/serial/uartlite.c | |
parent | [POWERPC] Xilinx: Update compatible to use values generated by BSP generator. (diff) | |
download | linux-3de66a175d2014246a2e990412e5750922e5c7d8.tar.xz linux-3de66a175d2014246a2e990412e5750922e5c7d8.zip |
[POWERPC] Eliminate broken OF console initialization.
Probing of the console at console_initcall time is broken. It tries to
call memory allocation routines which aren't initialized yet.
Problem solved by removing the early probe entirely. The console init
is called again anyway after the uartlite device is initialized and the
memory allocation routines can be called safely.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'drivers/serial/uartlite.c')
-rw-r--r-- | drivers/serial/uartlite.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c index b22023f1ec6b..1a7bccebd503 100644 --- a/drivers/serial/uartlite.c +++ b/drivers/serial/uartlite.c @@ -389,32 +389,6 @@ static void ulite_console_write(struct console *co, const char *s, spin_unlock_irqrestore(&port->lock, flags); } -#if defined(CONFIG_OF) -static inline void __init ulite_console_of_find_device(int id) -{ - struct device_node *np; - struct resource res; - const unsigned int *of_id; - int rc; - - for_each_matching_node(np, ulite_of_match) { - of_id = of_get_property(np, "port-number", NULL); - if ((!of_id) || (*of_id != id)) - continue; - - rc = of_address_to_resource(np, 0, &res); - if (rc) - continue; - - ulite_ports[id].mapbase = res.start; - of_node_put(np); - return; - } -} -#else /* CONFIG_OF */ -static inline void __init ulite_console_of_find_device(int id) { /* do nothing */ } -#endif /* CONFIG_OF */ - static int __init ulite_console_setup(struct console *co, char *options) { struct uart_port *port; @@ -428,11 +402,7 @@ static int __init ulite_console_setup(struct console *co, char *options) port = &ulite_ports[co->index]; - /* Check if it is an OF device */ - if (!port->mapbase) - ulite_console_of_find_device(co->index); - - /* Do we have a device now? */ + /* Has the device been initialized yet? */ if (!port->mapbase) { pr_debug("console on ttyUL%i not present\n", co->index); return -ENODEV; |