summaryrefslogtreecommitdiff
path: root/sys/dev/ofw/ofw_bus_subr.c
diff options
context:
space:
mode:
authorIan Lepore <ian@FreeBSD.org>2013-10-25 19:15:21 +0000
committerIan Lepore <ian@FreeBSD.org>2013-10-25 19:15:21 +0000
commit498fa7c1f9c8fa941e443c8c11c280b1853d8557 (patch)
treee1768111549781331ace4434166e3b61382c17a3 /sys/dev/ofw/ofw_bus_subr.c
parent7fedb8b7a527622f7d9c137f3fffc4e7e7446e5e (diff)
Notes
Diffstat (limited to 'sys/dev/ofw/ofw_bus_subr.c')
-rw-r--r--sys/dev/ofw/ofw_bus_subr.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/dev/ofw/ofw_bus_subr.c b/sys/dev/ofw/ofw_bus_subr.c
index 920912e4d06cb..26a675937c12e 100644
--- a/sys/dev/ofw/ofw_bus_subr.c
+++ b/sys/dev/ofw/ofw_bus_subr.c
@@ -197,6 +197,21 @@ ofw_bus_is_compatible_strict(device_t dev, const char *compatible)
return (0);
}
+const struct ofw_compat_data *
+ofw_bus_search_compatible(device_t dev, const struct ofw_compat_data *compat)
+{
+
+ if (compat == NULL)
+ return NULL;
+
+ for (; compat->ocd_str != NULL; ++compat) {
+ if (ofw_bus_is_compatible(dev, compat->ocd_str))
+ break;
+ }
+
+ return (compat);
+}
+
int
ofw_bus_has_prop(device_t dev, const char *propname)
{