mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 05:58:57 +00:00
devsw_add() and cdevsw_remove() are no longer needed.
This commit is contained in:
parent
d7c2057f75
commit
86af0d1529
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=86026
@ -157,26 +157,6 @@ static struct cdevsw digi_sw = {
|
||||
ttykqfilter /* bmaj */
|
||||
};
|
||||
|
||||
int
|
||||
digi_modhandler(module_t mod, int event, void *arg)
|
||||
{
|
||||
static int ref = 0;
|
||||
|
||||
switch (event) {
|
||||
case MOD_LOAD:
|
||||
if (ref++ == 0)
|
||||
cdevsw_add(&digi_sw);
|
||||
break;
|
||||
|
||||
case MOD_UNLOAD:
|
||||
if (--ref == 0)
|
||||
cdevsw_remove(&digi_sw);
|
||||
break;
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
static void
|
||||
digi_poll(void *ptr)
|
||||
{
|
||||
|
@ -211,7 +211,6 @@ extern const struct digi_control_signals digi_xixe_signals;
|
||||
extern const struct digi_control_signals digi_normal_signals;
|
||||
|
||||
const char *digi_errortxt(int _id);
|
||||
int digi_modhandler(module_t _mod, int _event, void *_arg);
|
||||
int digi_attach(struct digi_softc *);
|
||||
int digi_detach(device_t _dev);
|
||||
int digi_shutdown(device_t _dev);
|
||||
|
@ -469,6 +469,3 @@ static driver_t digi_isa_drv = {
|
||||
digi_isa_methods,
|
||||
sizeof(struct digi_softc),
|
||||
};
|
||||
|
||||
|
||||
DRIVER_MODULE(digi, isa, digi_isa_drv, digi_devclass, digi_modhandler, 0);
|
||||
|
@ -225,6 +225,3 @@ static driver_t digi_pci_drv = {
|
||||
digi_pci_methods,
|
||||
sizeof(struct digi_softc),
|
||||
};
|
||||
|
||||
|
||||
DRIVER_MODULE(digi, pci, digi_pci_drv, digi_devclass, digi_modhandler, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user