mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-18 15:30:21 +00:00
Add make_dev and remove_dev.
This commit is contained in:
parent
354b93e124
commit
92fc9a510e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=51998
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user