diff options
Diffstat (limited to 'drivers/tty/hvc/hvc_opal.c')
-rw-r--r-- | drivers/tty/hvc/hvc_opal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/hvc/hvc_opal.c b/drivers/tty/hvc/hvc_opal.c index cd69b48f6dfd..6496872e2e47 100644 --- a/drivers/tty/hvc/hvc_opal.c +++ b/drivers/tty/hvc/hvc_opal.c | |||
@@ -329,7 +329,7 @@ static void udbg_init_opal_common(void) | |||
329 | void __init hvc_opal_init_early(void) | 329 | void __init hvc_opal_init_early(void) |
330 | { | 330 | { |
331 | struct device_node *stdout_node = NULL; | 331 | struct device_node *stdout_node = NULL; |
332 | const u32 *termno; | 332 | const __be32 *termno; |
333 | const char *name = NULL; | 333 | const char *name = NULL; |
334 | const struct hv_ops *ops; | 334 | const struct hv_ops *ops; |
335 | u32 index; | 335 | u32 index; |
@@ -371,7 +371,7 @@ void __init hvc_opal_init_early(void) | |||
371 | if (!stdout_node) | 371 | if (!stdout_node) |
372 | return; | 372 | return; |
373 | termno = of_get_property(stdout_node, "reg", NULL); | 373 | termno = of_get_property(stdout_node, "reg", NULL); |
374 | index = termno ? *termno : 0; | 374 | index = termno ? be32_to_cpup(termno) : 0; |
375 | if (index >= MAX_NR_HVC_CONSOLES) | 375 | if (index >= MAX_NR_HVC_CONSOLES) |
376 | return; | 376 | return; |
377 | hvc_opal_privs[index] = &hvc_opal_boot_priv; | 377 | hvc_opal_privs[index] = &hvc_opal_boot_priv; |