Avoid the usurping message

This commit is contained in:
n_hibma 1999-11-11 17:36:33 +00:00
parent 4c498c4fde
commit 2ececa4e38
2 changed files with 15 additions and 2 deletions

View File

@ -187,7 +187,13 @@ USB_ATTACH(ugen)
}
#ifdef __FreeBSD__
cdevsw_add(&ugen_cdevsw);
{
static int global_init_done = 0;
if (!global_init_done) {
cdevsw_add(&ugen_cdevsw);
global_init_done = 1;
}
}
#endif
USB_ATTACH_SUCCESS_RETURN;
}

View File

@ -231,7 +231,14 @@ USB_ATTACH(uhid)
sc->sc_repdesc_size = size;
#ifdef __FreeBSD__
cdevsw_add(&uhid_cdevsw);
{
static int global_init_done = 0;
if (!global_init_done) {
cdevsw_add(&uhid_cdevsw);
global_init_done = 1;
}
}
#endif
USB_ATTACH_SUCCESS_RETURN;
}