From 92fc9a510e833bb1596be18b46c4d132be9a847b Mon Sep 17 00:00:00 2001 From: Nick 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(+) (limited to 'sys/dev/usb') diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c index 740300df0abd..92adb9016232 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.3