Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/fdt Scan children of the /chosen node to pick up sim...
details: https://anonhg.NetBSD.org/src/rev/402eaff074fd
branches: trunk
changeset: 356007:402eaff074fd
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sun Aug 27 19:13:31 2017 +0000
description:
Scan children of the /chosen node to pick up simplefb nodes
diffstat:
sys/dev/fdt/fdtbus.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diffs (36 lines):
diff -r 866020ff80d6 -r 402eaff074fd sys/dev/fdt/fdtbus.c
--- a/sys/dev/fdt/fdtbus.c Sun Aug 27 17:53:31 2017 +0000
+++ b/sys/dev/fdt/fdtbus.c Sun Aug 27 19:13:31 2017 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -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 @@
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;
Home |
Main Index |
Thread Index |
Old Index