summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2013-12-01 19:05:32 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2013-12-01 19:05:32 +0000
commit8462fff4bad68a6fe07e1d8d6bc39676733d5264 (patch)
tree3f4fa486b6a191d41fc9eac197730b06830a7f56
parenta2abcd3902e075980d64b04f4e71c326f2332ea4 (diff)
downloadFreeBSD-src-8462fff4bad68a6fe07e1d8d6bc39676733d5264.zip
FreeBSD-src-8462fff4bad68a6fe07e1d8d6bc39676733d5264.tar.gz
Real OF systems have an ihandle under /chosen/stdout, not a phandle. Use
the right type.
-rw-r--r--sys/dev/uart/uart_cpu_powerpc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/uart/uart_cpu_powerpc.c b/sys/dev/uart/uart_cpu_powerpc.c
index 44f6338..0791c77 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;
OpenPOWER on IntegriCloud