git: 967949e7c525 - main - mlx: Use devclass_find to lookup the devclass for mlxd.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Thu, 21 Apr 2022 17:30:04 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=967949e7c525c3c171b97452a65059c7803bc003

commit 967949e7c525c3c171b97452a65059c7803bc003
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-04-21 17:29:14 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-04-21 17:29:14 +0000

    mlx: Use devclass_find to lookup the devclass for mlxd.
    
    Reviewed by:    imp
    Differential Revision:  https://reviews.freebsd.org/D34994
---
 sys/dev/mlx/mlx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c
index 2f961d23e304..1afdccdc49c5 100644
--- a/sys/dev/mlx/mlx.c
+++ b/sys/dev/mlx/mlx.c
@@ -980,7 +980,7 @@ mlx_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int32_t flag, struct threa
 	error = ENOENT;
 	MLX_CONFIG_LOCK(sc);
 	bus_topo_lock();
-	mlxd = (struct mlxd_softc *)devclass_get_softc(mlxd_devclass, *arg);
+	mlxd = devclass_get_softc(devclass_find("mlxd"), *arg);
 	bus_topo_unlock();
 	if ((mlxd != NULL) && (mlxd->mlxd_drive >= sc->mlx_sysdrive) && 
 	    (mlxd->mlxd_drive < (sc->mlx_sysdrive + MLX_MAXDRIVES))) {