summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/ugen.c
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/dev/usb/ugen.c
parent4c498c4fdeb063ec3facb3dd2964fb02d90c17f5 (diff)
downloadFreeBSD-src-2ececa4e38eb36e8492f6789ab235214af09adad.zip
FreeBSD-src-2ececa4e38eb36e8492f6789ab235214af09adad.tar.gz
Avoid the usurping message
Diffstat (limited to 'sys/dev/usb/ugen.c')
-rw-r--r--sys/dev/usb/ugen.c8
1 files changed, 7 insertions, 1 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;
}
OpenPOWER on IntegriCloud