diff options
author | Andrew Thompson <thompsa@FreeBSD.org> | 2009-02-27 17:27:16 +0000 |
---|---|---|
committer | Andrew Thompson <thompsa@FreeBSD.org> | 2009-02-27 17:27:16 +0000 |
commit | ee3e3ff5c201f0b8942ea912ce7ebfdccb32af52 (patch) | |
tree | 799ccaf32ee5b67a3fd075acab472e59c72735d8 /sys/dev/usb/input/uhid.c | |
parent | 2ebdf042257919c7ee6a2c7d8761a3803c0c87c0 (diff) | |
download | src-ee3e3ff5c201f0b8942ea912ce7ebfdccb32af52.tar.gz src-ee3e3ff5c201f0b8942ea912ce7ebfdccb32af52.zip |
Change USB over to make_dev() for all device nodes, previously it hooked into
the devfs clone handler to open the (invisible) devices on the fly.
The /dev entries are layed out as follows,
/dev/usbctl = master device
/dev/usb/0.1.0.5 = usb device, (<bus>.<dev>.<iface>.<endpoint>)
/dev/ugen0.1 -> usb/0.1.0.0 = ugen link to ctrl endpoint
This also removes the custom permissions model from USB. Bump
__FreeBSD_version to 800066.
Submitted by: rink (earlier version)
Notes
Notes:
svn path=/head/; revision=189110
Diffstat (limited to 'sys/dev/usb/input/uhid.c')
-rw-r--r-- | sys/dev/usb/input/uhid.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/dev/usb/input/uhid.c b/sys/dev/usb/input/uhid.c index 563bd9959eae..c2307f580cbc 100644 --- a/sys/dev/usb/input/uhid.c +++ b/sys/dev/usb/input/uhid.c @@ -447,7 +447,7 @@ done: } static int -uhid_open(struct usb2_fifo *fifo, int fflags, struct thread *td) +uhid_open(struct usb2_fifo *fifo, int fflags) { struct uhid_softc *sc = fifo->priv_sc0; @@ -474,7 +474,7 @@ uhid_open(struct usb2_fifo *fifo, int fflags, struct thread *td) } static void -uhid_close(struct usb2_fifo *fifo, int fflags, struct thread *td) +uhid_close(struct usb2_fifo *fifo, int fflags) { if (fflags & (FREAD | FWRITE)) { usb2_fifo_free_buffer(fifo); @@ -483,7 +483,7 @@ uhid_close(struct usb2_fifo *fifo, int fflags, struct thread *td) static int uhid_ioctl(struct usb2_fifo *fifo, u_long cmd, void *addr, - int fflags, struct thread *td) + int fflags) { struct uhid_softc *sc = fifo->priv_sc0; struct usb2_gen_descriptor *ugd; @@ -734,13 +734,11 @@ uhid_attach(device_t dev) sc->sc_fsize); sc->sc_fsize = UHID_BSIZE; } - /* set interface permissions */ - usb2_set_iface_perm(uaa->device, uaa->info.bIfaceIndex, - UID_ROOT, GID_OPERATOR, 0644); error = usb2_fifo_attach(uaa->device, sc, &sc->sc_mtx, &uhid_fifo_methods, &sc->sc_fifo, - unit, 0 - 1, uaa->info.bIfaceIndex); + unit, 0 - 1, uaa->info.bIfaceIndex, + UID_ROOT, GID_OPERATOR, 0644); if (error) { goto detach; } |