summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorn_hibma <n_hibma@FreeBSD.org>1999-11-11 17:36:33 +0000
committern_hibma <n_hibma@FreeBSD.org>1999-11-11 17:36:33 +0000
commit2ececa4e38eb36e8492f6789ab235214af09adad (patch)
tree8cd424a58b1dff7def2a49c8eead3523e19acd85 /sys
parent4c498c4fdeb063ec3facb3dd2964fb02d90c17f5 (diff)
downloadFreeBSD-src-2ececa4e38eb36e8492f6789ab235214af09adad.zip
FreeBSD-src-2ececa4e38eb36e8492f6789ab235214af09adad.tar.gz
Avoid the usurping message
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/ugen.c8
-rw-r--r--sys/dev/usb/uhid.c9
2 files changed, 15 insertions, 2 deletions
diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c
index a5071a4..2d433d4 100644
--- a/sys/dev/usb/ugen.c
+++ b/sys/dev/usb/ugen.c
@@ -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;
}
diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c
index e2371bb..719341c 100644
--- a/sys/dev/usb/uhid.c
+++ b/sys/dev/usb/uhid.c
@@ -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;
}
OpenPOWER on IntegriCloud