diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-09-23 04:05:08 +0200 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-10-11 07:48:54 +0200 |
commit | 5c94913c5f9834b0d35e20359db457783962bed5 (patch) | |
tree | fefb65edb10e3560b9acabeca75734789bc51863 /drivers/tty | |
parent | powerpc/hvsi: Fix endian issues in HVSI driver (diff) | |
download | linux-5c94913c5f9834b0d35e20359db457783962bed5.tar.xz linux-5c94913c5f9834b0d35e20359db457783962bed5.zip |
tty/hvc_opal: powerpc: Make OPAL HVC device tree accesses endian safe
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/tty')
-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) void __init hvc_opal_init_early(void) { struct device_node *stdout_node = NULL; - const u32 *termno; + const __be32 *termno; const char *name = NULL; const struct hv_ops *ops; u32 index; @@ -371,7 +371,7 @@ void __init hvc_opal_init_early(void) if (!stdout_node) return; termno = of_get_property(stdout_node, "reg", NULL); - index = termno ? *termno : 0; + index = termno ? be32_to_cpup(termno) : 0; if (index >= MAX_NR_HVC_CONSOLES) return; hvc_opal_privs[index] = &hvc_opal_boot_priv; |