Avoid the usurping message
This commit is contained in:
parent
4c498c4fde
commit
2ececa4e38
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user