git: 58d8316109c9 - main - bhnd: Use devclass_find to lookup devclass for bhnd.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 05 May 2022 23:42:22 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=58d8316109c9559143a72b1e9ccb4174200ea0ce commit 58d8316109c9559143a72b1e9ccb4174200ea0ce Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2022-05-05 23:34:02 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2022-05-05 23:34:02 +0000 bhnd: Use devclass_find to lookup devclass for bhnd. Differential Revision: https://reviews.freebsd.org/D35058 --- sys/dev/bhnd/bhnd_subr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/bhnd/bhnd_subr.c b/sys/dev/bhnd/bhnd_subr.c index 955e1a197002..7401b51576be 100644 --- a/sys/dev/bhnd/bhnd_subr.c +++ b/sys/dev/bhnd/bhnd_subr.c @@ -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);