Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ofw/ofw_bus_subr.c
Show First 20 Lines • Show All 248 Lines • ▼ Show 20 Lines | ofw_bus_search_compatible(device_t dev, const struct ofw_compat_data *compat) | ||||
for (; compat->ocd_str != NULL; ++compat) { | for (; compat->ocd_str != NULL; ++compat) { | ||||
if (ofw_bus_is_compatible(dev, compat->ocd_str)) | if (ofw_bus_is_compatible(dev, compat->ocd_str)) | ||||
break; | break; | ||||
} | } | ||||
return (compat); | return (compat); | ||||
} | } | ||||
const struct ofw_compat_data * | |||||
ofw_bus_compatible_lookup(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)) | |||||
return (compat); | |||||
} | |||||
return (NULL); | |||||
} | |||||
int | int | ||||
ofw_bus_has_prop(device_t dev, const char *propname) | ofw_bus_has_prop(device_t dev, const char *propname) | ||||
{ | { | ||||
phandle_t node; | phandle_t node; | ||||
if ((node = ofw_bus_get_node(dev)) == -1) | if ((node = ofw_bus_get_node(dev)) == -1) | ||||
return (0); | return (0); | ||||
▲ Show 20 Lines • Show All 476 Lines • Show Last 20 Lines |