diff options
author | Grant Likely <grant.likely@linaro.org> | 2014-08-11 15:03:08 +0200 |
---|---|---|
committer | Grant Likely <grant.likely@linaro.org> | 2014-08-11 15:03:08 +0200 |
commit | b775e642bf958a02210ac4d4edd1a1b7067c49fa (patch) | |
tree | a3425ead7b2738e6a05249a3c3667d1069782330 /drivers/tty/serial | |
parent | of: Fixing OF Selftest build error (diff) | |
parent | of: Migrate of_find_node_by_name() users to for_each_node_by_name() (diff) | |
download | linux-b775e642bf958a02210ac4d4edd1a1b7067c49fa.tar.xz linux-b775e642bf958a02210ac4d4edd1a1b7067c49fa.zip |
Merge branch 'devicetree/next-console' into devicetree/next
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r-- | drivers/tty/serial/pmac_zilog.c | 9 | ||||
-rw-r--r-- | drivers/tty/serial/serial_core.c | 3 |
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c index 8193635103ee..01e180bc6b5d 100644 --- a/drivers/tty/serial/pmac_zilog.c +++ b/drivers/tty/serial/pmac_zilog.c @@ -1650,8 +1650,7 @@ static int __init pmz_probe(void) /* * Find all escc chips in the system */ - node_p = of_find_node_by_name(NULL, "escc"); - while (node_p) { + for_each_node_by_name(node_p, "escc") { /* * First get channel A/B node pointers * @@ -1669,7 +1668,7 @@ static int __init pmz_probe(void) of_node_put(node_b); printk(KERN_ERR "pmac_zilog: missing node %c for escc %s\n", (!node_a) ? 'a' : 'b', node_p->full_name); - goto next; + continue; } /* @@ -1696,11 +1695,9 @@ static int __init pmz_probe(void) of_node_put(node_b); memset(&pmz_ports[count], 0, sizeof(struct uart_pmac_port)); memset(&pmz_ports[count+1], 0, sizeof(struct uart_pmac_port)); - goto next; + continue; } count += 2; -next: - node_p = of_find_node_by_name(node_p, "escc"); } pmz_ports_count = count; diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index fbf6c5ad222f..3ce68f962c92 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -26,6 +26,7 @@ #include <linux/slab.h> #include <linux/init.h> #include <linux/console.h> +#include <linux/of.h> #include <linux/proc_fs.h> #include <linux/seq_file.h> #include <linux/device.h> @@ -2615,6 +2616,8 @@ int uart_add_one_port(struct uart_driver *drv, struct uart_port *uport) spin_lock_init(&uport->lock); lockdep_set_class(&uport->lock, &port_lock_key); } + if (uport->cons && uport->dev) + of_console_check(uport->dev->of_node, uport->cons->name, uport->line); uart_configure_port(drv, state, uport); |