From 01a5c1aac5087266f5ab9b5f59523f1d522298fb Mon Sep 17 00:00:00 2001 From: n_hibma Date: Thu, 7 Oct 1999 21:06:52 +0000 Subject: Add make_dev and remove_dev. --- sys/dev/usb/ums.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c index 740300d..92adb90 100644 --- a/sys/dev/usb/ums.c +++ b/sys/dev/usb/ums.c @@ -111,6 +111,8 @@ struct ums_softc { # define UMS_ASLEEP 0x01 /* readFromDevice is waiting */ # define UMS_SELECT 0x02 /* select is waiting */ struct selinfo rsel; /* process waiting in select */ + + dev_t dev; /* specfs */ }; #define MOUSE_FLAGS_MASK (HIO_CONST|HIO_RELATIVE) @@ -330,6 +332,9 @@ USB_ATTACH(ums) sc->rsel.si_flags = 0; sc->rsel.si_pid = 0; + sc->dev = make_dev(&ums_cdevsw, device_get_unit(self), UID_ROOT, GID_OPERATOR, + 0644, "ums%d", device_get_unit(self)); + USB_ATTACH_SUCCESS_RETURN; } @@ -367,6 +372,8 @@ ums_detach(device_t self) } #endif + remove_dev(sc->dev); + return 0; } -- cgit v1.1