]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/boot/ofconsole.c
Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
[karo-tx-linux.git] / arch / powerpc / boot / ofconsole.c
index 43c0f36c3326b83dfddac2babcd22ad6b84c7cd6..8b754702460aee3e51eabd016d71c888abd4a719 100644 (file)
 
 #include "of.h"
 
-static void *of_stdout_handle;
+static unsigned int of_stdout_handle;
 
 static int of_console_open(void)
 {
        void *devp;
 
-       if (((devp = finddevice("/chosen")) != NULL)
-                       && (getprop(devp, "stdout", &of_stdout_handle,
-                               sizeof(of_stdout_handle))
-                               == sizeof(of_stdout_handle)))
+       if (((devp = of_finddevice("/chosen")) != NULL)
+           && (of_getprop(devp, "stdout", &of_stdout_handle,
+                          sizeof(of_stdout_handle))
+               == sizeof(of_stdout_handle))) {
+               of_stdout_handle = be32_to_cpu(of_stdout_handle);
                return 0;
+       }
 
        return -1;
 }