firewire: Initialize firewire_devclass in fw_modevent.

The use of devclass_get_softc() combined with cdev unit numbers is
probably not ideal (probably should be initializing si_drv1 when each
cdev is created instead), but it looks like a bit of a PITA to do, so
just initialize the devclass explicitly instead.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D35060
This commit is contained in:
John Baldwin 2022-04-27 12:26:05 -07:00
parent e6dede1456
commit fa160738bd

View File

@ -2368,6 +2368,7 @@ fw_modevent(module_t mode, int type, void *data)
switch (type) {
case MOD_LOAD:
firewire_devclass = devclass_create("firewire");
fwdev_ehtag = EVENTHANDLER_REGISTER(dev_clone,
fwdev_clone, 0, 1000);
break;
@ -2384,6 +2385,5 @@ fw_modevent(module_t mode, int type, void *data)
}
DRIVER_MODULE(firewire, fwohci, firewire_driver, firewire_devclass,
fw_modevent,0);
DRIVER_MODULE(firewire, fwohci, firewire_driver, fw_modevent, NULL);
MODULE_VERSION(firewire, 1);