diff options
author | Grant Likely <grant.likely@linaro.org> | 2014-03-28 08:12:18 -0700 |
---|---|---|
committer | Grant Likely <grant.likely@linaro.org> | 2014-06-26 17:12:23 +0100 |
commit | a752ee56ad84bf9a35b8323af1ad22b03c1df2c4 (patch) | |
tree | ca01e3094f6fcd5b101dcc7edf716a25df3029d5 /drivers/tty/hvc/hvc_opal.c | |
parent | 003882180340a2808151d320dedd853f4cff5e4b (diff) | |
download | op-kernel-dev-a752ee56ad84bf9a35b8323af1ad22b03c1df2c4.zip op-kernel-dev-a752ee56ad84bf9a35b8323af1ad22b03c1df2c4.tar.gz |
tty: Update hypervisor tty drivers to use core stdout parsing code.
The evh_bytechan, hvc_opal and hvc_vio drivers all open code the parsing
of the stdout node in the device tree. This patch simplifies the driver
by removing the duplicated functionality.
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Diffstat (limited to 'drivers/tty/hvc/hvc_opal.c')
-rw-r--r-- | drivers/tty/hvc/hvc_opal.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/tty/hvc/hvc_opal.c b/drivers/tty/hvc/hvc_opal.c index a585079..a2cc5f8 100644 --- a/drivers/tty/hvc/hvc_opal.c +++ b/drivers/tty/hvc/hvc_opal.c @@ -342,22 +342,13 @@ static void udbg_init_opal_common(void) void __init hvc_opal_init_early(void) { - struct device_node *stdout_node = NULL; + struct device_node *stdout_node = of_node_get(of_stdout); const __be32 *termno; - const char *name = NULL; const struct hv_ops *ops; u32 index; - /* find the boot console from /chosen/stdout */ - if (of_chosen) - name = of_get_property(of_chosen, "linux,stdout-path", NULL); - if (name) { - stdout_node = of_find_node_by_path(name); - if (!stdout_node) { - pr_err("hvc_opal: Failed to locate default console!\n"); - return; - } - } else { + /* If the console wasn't in /chosen, try /ibm,opal */ + if (!stdout_node) { struct device_node *opal, *np; /* Current OPAL takeover doesn't provide the stdout |