diff options
author | Grant Likely <grant.likely@linaro.org> | 2014-03-28 11:12:18 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@linaro.org> | 2014-06-26 12:12:23 -0400 |
commit | a752ee56ad84bf9a35b8323af1ad22b03c1df2c4 (patch) | |
tree | ca01e3094f6fcd5b101dcc7edf716a25df3029d5 /drivers/of/base.c | |
parent | 003882180340a2808151d320dedd853f4cff5e4b (diff) |
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/of/base.c')
-rw-r--r-- | drivers/of/base.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c index df9b2bb7bb27..e4f95ba0a3eb 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c | |||
@@ -36,7 +36,7 @@ struct device_node *of_allnodes; | |||
36 | EXPORT_SYMBOL(of_allnodes); | 36 | EXPORT_SYMBOL(of_allnodes); |
37 | struct device_node *of_chosen; | 37 | struct device_node *of_chosen; |
38 | struct device_node *of_aliases; | 38 | struct device_node *of_aliases; |
39 | static struct device_node *of_stdout; | 39 | struct device_node *of_stdout; |
40 | 40 | ||
41 | static struct kset *of_kset; | 41 | static struct kset *of_kset; |
42 | 42 | ||
@@ -2063,9 +2063,12 @@ void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align)) | |||
2063 | of_chosen = of_find_node_by_path("/chosen@0"); | 2063 | of_chosen = of_find_node_by_path("/chosen@0"); |
2064 | 2064 | ||
2065 | if (of_chosen) { | 2065 | if (of_chosen) { |
2066 | /* linux,stdout-path and /aliases/stdout are for legacy compatibility */ | ||
2066 | const char *name = of_get_property(of_chosen, "stdout-path", NULL); | 2067 | const char *name = of_get_property(of_chosen, "stdout-path", NULL); |
2067 | if (!name) | 2068 | if (!name) |
2068 | name = of_get_property(of_chosen, "linux,stdout-path", NULL); | 2069 | name = of_get_property(of_chosen, "linux,stdout-path", NULL); |
2070 | if (IS_ENABLED(CONFIG_PPC) && !name) | ||
2071 | name = of_get_property(of_aliases, "stdout", NULL); | ||
2069 | if (name) | 2072 | if (name) |
2070 | of_stdout = of_find_node_by_path(name); | 2073 | of_stdout = of_find_node_by_path(name); |
2071 | } | 2074 | } |