aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/btext.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/btext.c')
-rw-r--r--arch/powerpc/kernel/btext.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c
index b4241ed1456e..6dfceaa820e4 100644
--- a/arch/powerpc/kernel/btext.c
+++ b/arch/powerpc/kernel/btext.c
@@ -232,20 +232,12 @@ static int btext_initialize(struct device_node *np)
232 232
233int __init btext_find_display(int allow_nonstdout) 233int __init btext_find_display(int allow_nonstdout)
234{ 234{
235 const char *name; 235 struct device_node *np = of_stdout;
236 struct device_node *np = NULL;
237 int rc = -ENODEV; 236 int rc = -ENODEV;
238 237
239 name = of_get_property(of_chosen, "linux,stdout-path", NULL); 238 if (!of_node_is_type(np, "display")) {
240 if (name != NULL) { 239 printk("boot stdout isn't a display !\n");
241 np = of_find_node_by_path(name); 240 np = NULL;
242 if (np != NULL) {
243 if (strcmp(np->type, "display") != 0) {
244 printk("boot stdout isn't a display !\n");
245 of_node_put(np);
246 np = NULL;
247 }
248 }
249 } 241 }
250 if (np) 242 if (np)
251 rc = btext_initialize(np); 243 rc = btext_initialize(np);