diff options
author | Stefan Kempf <stefan@cvs.openbsd.org> | 2016-02-28 17:57:51 +0000 |
---|---|---|
committer | Stefan Kempf <stefan@cvs.openbsd.org> | 2016-02-28 17:57:51 +0000 |
commit | 43330e100434f30b2b0a53caff94f395f110ba93 (patch) | |
tree | 2c990c29acbb6040625f75fecae74c9de68567de /sys/dev | |
parent | fa35b09d6b1e3dd78046d5654ecf909b32a652ed (diff) |
Remove USB_SET_IMMED ioctl and corresponding code and manpage bits.
Nothing uses it.
suggested by and ok mpi@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/uhid.c | 25 | ||||
-rw-r--r-- | sys/dev/usb/usb.h | 3 |
2 files changed, 2 insertions, 26 deletions
diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index e56b2317d6a..e1ad7d026c8 100644 --- a/sys/dev/usb/uhid.c +++ b/sys/dev/usb/uhid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhid.c,v 1.63 2016/01/09 04:14:42 jcs Exp $ */ +/* $OpenBSD: uhid.c,v 1.64 2016/02/28 17:57:50 stefan Exp $ */ /* $NetBSD: uhid.c,v 1.57 2003/03/11 16:44:00 augustss Exp $ */ /* @@ -78,7 +78,6 @@ struct uhid_softc { struct process *sc_async; /* process that wants SIGIO */ u_char sc_state; /* driver state */ #define UHID_ASLP 0x01 /* waiting for device data */ -#define UHID_IMMED 0x02 /* return read data immediately */ int sc_refcnt; }; @@ -229,7 +228,6 @@ uhidopen(dev_t dev, int flag, int mode, struct proc *p) clalloc(&sc->sc_q, UHID_BSIZE, 0); sc->sc_obuf = malloc(sc->sc_hdev.sc_osize, M_USBDEV, M_WAITOK); - sc->sc_state &= ~UHID_IMMED; sc->sc_async = NULL; return (0); @@ -261,14 +259,6 @@ uhid_do_read(struct uhid_softc *sc, struct uio *uio, int flag) u_char buffer[UHID_CHUNK]; DPRINTFN(1, ("uhidread\n")); - if (sc->sc_state & UHID_IMMED) { - DPRINTFN(1, ("uhidread immed\n")); - if (uhidev_get_report(sc->sc_hdev.sc_parent, - UHID_INPUT_REPORT, sc->sc_hdev.sc_report_id, buffer, - sc->sc_hdev.sc_isize) != sc->sc_hdev.sc_isize) - return (EIO); - return (uiomovei(buffer, sc->sc_hdev.sc_isize, uio)); - } s = splusb(); while (sc->sc_q.c_cc == 0) { @@ -367,7 +357,6 @@ int uhid_do_ioctl(struct uhid_softc *sc, u_long cmd, caddr_t addr, int flag, struct proc *p) { - u_char buffer[UHID_CHUNK]; usbd_status err; int rc, size; @@ -399,18 +388,6 @@ uhid_do_ioctl(struct uhid_softc *sc, u_long cmd, caddr_t addr, return (EPERM); break; - case USB_SET_IMMED: - if (*(int *)addr) { - if (uhidev_get_report(sc->sc_hdev.sc_parent, - UHID_INPUT_REPORT, sc->sc_hdev.sc_report_id, buffer, - sc->sc_hdev.sc_isize) != sc->sc_hdev.sc_isize) - return (EOPNOTSUPP); - - sc->sc_state |= UHID_IMMED; - } else - sc->sc_state &= ~UHID_IMMED; - break; - case USB_GET_DEVICEINFO: usbd_fill_deviceinfo(sc->sc_hdev.sc_udev, (struct usb_device_info *)addr, 1); diff --git a/sys/dev/usb/usb.h b/sys/dev/usb/usb.h index 2816c1805bf..9c06d5ec0df 100644 --- a/sys/dev/usb/usb.h +++ b/sys/dev/usb/usb.h @@ -1,4 +1,4 @@ -/* $OpenBSD: usb.h,v 1.53 2015/07/09 05:40:44 mpi Exp $ */ +/* $OpenBSD: usb.h,v 1.54 2016/02/28 17:57:50 stefan Exp $ */ /* $NetBSD: usb.h,v 1.69 2002/09/22 23:20:50 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb.h,v 1.14 1999/11/17 22:33:46 n_hibma Exp $ */ @@ -761,7 +761,6 @@ struct usb_device_stats { /* Generic HID device */ #define USB_GET_REPORT_DESC _IOR ('U', 21, struct usb_ctl_report_desc) -#define USB_SET_IMMED _IOW ('U', 22, int) #define USB_GET_REPORT _IOWR('U', 23, struct usb_ctl_report) #define USB_SET_REPORT _IOW ('U', 24, struct usb_ctl_report) #define USB_GET_REPORT_ID _IOR ('U', 25, int) |