Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 83986
b: refs/heads/master
c: 3de66a1
h: refs/heads/master
v: v3
  • Loading branch information
Grant Likely committed Feb 6, 2008
1 parent de4ac2f commit 3cc541b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 32 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0e349b0e2d90eb1bb76d16c48d0127feebfeeb89
refs/heads/master: 3de66a175d2014246a2e990412e5750922e5c7d8
32 changes: 1 addition & 31 deletions trunk/drivers/serial/uartlite.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 3cc541b

Please sign in to comment.