Module Name:    src
Committed By:   jmcneill
Date:           Sun Aug 27 19:13:31 UTC 2017

Modified Files:
        src/sys/dev/fdt: fdtbus.c

Log Message:
Scan children of the /chosen node to pick up simplefb nodes


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/fdt/fdtbus.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/fdt/fdtbus.c
diff -u src/sys/dev/fdt/fdtbus.c:1.14 src/sys/dev/fdt/fdtbus.c:1.15
--- src/sys/dev/fdt/fdtbus.c:1.14	Wed Jun 28 23:45:20 2017
+++ src/sys/dev/fdt/fdtbus.c	Sun Aug 27 19:13:31 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: fdtbus.c,v 1.14 2017/06/28 23:45:20 jmcneill Exp $ */
+/* $NetBSD: fdtbus.c,v 1.15 2017/08/27 19:13:31 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill <[email protected]>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.14 2017/06/28 23:45:20 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.15 2017/08/27 19:13:31 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -92,10 +92,13 @@ fdt_match(device_t parent, cfdata_t cf, 
 	if (match)
 		return match;
 
-	/* Some /clocks nodes have no compatible string */
-	if (!of_hasprop(phandle, "compatible") &&
-	    OF_finddevice("/clocks") == phandle)
-		return 1;
+	/* Some nodes have no compatible string */
+	if (!of_hasprop(phandle, "compatible")) {
+		if (OF_finddevice("/clocks") == phandle)
+			return 1;
+		if (OF_finddevice("/chosen") == phandle)
+			return 1;
+	}
 
 	/* Always match the root node */
 	return OF_finddevice("/") == phandle;

Reply via email to