Use cdevsw_add() explicitly as a workaround for DEV_DRIVER_MODULE().

This should be changed to use make_dev() at some point.
This commit is contained in:
Peter Wemm 1999-11-08 07:24:55 +00:00
parent 8cd932769f
commit b09ce13f07
2 changed files with 8 additions and 3 deletions

View File

@ -186,6 +186,9 @@ USB_ATTACH(ugen)
USB_ATTACH_ERROR_RETURN;
}
#ifdef __FreeBSD__
cdevsw_add(&ugen_cdevsw);
#endif
USB_ATTACH_SUCCESS_RETURN;
}
@ -1149,5 +1152,5 @@ ugenpoll(dev, events, p)
}
#if defined(__FreeBSD__)
DEV_DRIVER_MODULE(ugen, uhub, ugen_driver, ugen_devclass, ugen_cdevsw, usbd_driver_load, 0);
DRIVER_MODULE(ugen, uhub, ugen_driver, ugen_devclass, usbd_driver_load, 0);
#endif

View File

@ -230,6 +230,9 @@ USB_ATTACH(uhid)
sc->sc_repdesc = desc;
sc->sc_repdesc_size = size;
#ifdef __FreeBSD__
cdevsw_add(&uhid_cdevsw);
#endif
USB_ATTACH_SUCCESS_RETURN;
}
@ -663,6 +666,5 @@ uhidpoll(dev, events, p)
}
#if defined(__FreeBSD__)
DEV_DRIVER_MODULE(uhid, uhub, uhid_driver, uhid_devclass,
uhid_cdevsw, usbd_driver_load, 0);
DRIVER_MODULE(uhid, uhub, uhid_driver, uhid_devclass, usbd_driver_load, 0);
#endif