diff options
Diffstat (limited to 'sys/dev/ofw/ofw_bus_subr.c')
-rw-r--r-- | sys/dev/ofw/ofw_bus_subr.c | 15 |
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) { |