Skip to content

Commit

Permalink
tty/hvc_opal: powerpc: Make OPAL HVC device tree accesses endian safe
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Benjamin Herrenschmidt committed Oct 11, 2013
1 parent 99fc1d9 commit 5c94913
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/tty/hvc/hvc_opal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 5c94913

Please sign in to comment.