powerpc: Make device tree accesses in HVC VIO console endian safe
authorAnton Blanchard <anton@samba.org>
Tue, 6 Aug 2013 16:01:39 +0000 (02:01 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 14 Aug 2013 05:33:29 +0000 (15:33 +1000)
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
drivers/tty/hvc/hvc_vio.c

index 0c629807610e6576ff822f2b958d8894e4182dc7..c791b18cdd086a1fa22b470ba8b9904dd0fc01e3 100644 (file)
@@ -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;
 
This page took 0.029664 seconds and 5 git commands to generate.