From: Anton Blanchard Date: Tue, 6 Aug 2013 16:01:39 +0000 (+1000) Subject: powerpc: Make device tree accesses in HVC VIO console endian safe X-Git-Tag: MMI-PSA29.97-13-9~13718^2~42 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1502b480e2296359728e4b4e112faf5a5599ca32;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git powerpc: Make device tree accesses in HVC VIO console endian safe Signed-off-by: Anton Blanchard Signed-off-by: Benjamin Herrenschmidt --- diff --git a/drivers/tty/hvc/hvc_vio.c b/drivers/tty/hvc/hvc_vio.c index 0c629807610e..c791b18cdd08 100644 --- a/drivers/tty/hvc/hvc_vio.c +++ b/drivers/tty/hvc/hvc_vio.c @@ -404,7 +404,7 @@ module_exit(hvc_vio_exit); void __init hvc_vio_init_early(void) { struct device_node *stdout_node; - const u32 *termno; + const __be32 *termno; const char *name; const struct hv_ops *ops; @@ -429,7 +429,7 @@ void __init hvc_vio_init_early(void) termno = of_get_property(stdout_node, "reg", NULL); if (termno == NULL) goto out; - hvterm_priv0.termno = *termno; + hvterm_priv0.termno = of_read_number(termno, 1); spin_lock_init(&hvterm_priv0.buf_lock); hvterm_privs[0] = &hvterm_priv0;