From 02ef3f33de6e52a747f42a6f0c1ee67e1fbfd62d Mon Sep 17 00:00:00 2001 From: Nathan Whitehorn Date: Sun, 1 Dec 2013 19:05:32 +0000 Subject: [PATCH] Real OF systems have an ihandle under /chosen/stdout, not a phandle. Use the right type. --- sys/dev/uart/uart_cpu_powerpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/uart/uart_cpu_powerpc.c b/sys/dev/uart/uart_cpu_powerpc.c index 44f63389553..0791c7783ba 100644 --- a/sys/dev/uart/uart_cpu_powerpc.c +++ b/sys/dev/uart/uart_cpu_powerpc.c @@ -89,13 +89,13 @@ ofw_get_console_phandle_path(phandle_t node, phandle_t *result, return (ENXIO); OF_getprop(node, prop, &field, sizeof(field)); - /* This property might be a phandle or might be a path. Hooray. */ + /* This property might be either a ihandle or path. Hooray. */ output = -1; if (field.buf[size - 1] == 0) output = OF_finddevice(field.buf); if (output == -1 && size == 4) - output = OF_xref_phandle(field.ref); + output = OF_instance_to_package(field.ref); if (output != -1) { *result = output;