mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 09:10:28 +00:00
bhnd: Use devclass_find to lookup devclass for bhnd.
Differential Revision: https://reviews.freebsd.org/D35058
This commit is contained in:
parent
b483b6b256
commit
58d8316109
|
@ -602,7 +602,8 @@ bhnd_find_bridge_root(device_t dev, devclass_t bus_class)
|
|||
devclass_t bhndb_class;
|
||||
device_t parent;
|
||||
|
||||
KASSERT(device_get_devclass(device_get_parent(dev)) == bhnd_devclass,
|
||||
KASSERT(device_get_devclass(device_get_parent(dev)) ==
|
||||
devclass_find("bhnd"),
|
||||
("%s not a bhnd device", device_get_nameunit(dev)));
|
||||
|
||||
bhndb_class = devclass_find("bhndb");
|
||||
|
@ -864,7 +865,7 @@ bhnd_device_matches(device_t dev, const struct bhnd_device_match *desc)
|
|||
if (m_core.m.match_flags) {
|
||||
/* Only applicable to bhnd-attached cores */
|
||||
parent = device_get_parent(dev);
|
||||
if (device_get_devclass(parent) != bhnd_devclass) {
|
||||
if (device_get_devclass(parent) != devclass_find("bhnd")) {
|
||||
device_printf(dev, "attempting to match core "
|
||||
"attributes against non-core device\n");
|
||||
return (false);
|
||||
|
|
Loading…
Reference in a new issue