diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-05-24 05:35:02 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-05-24 05:35:02 +0000 |
commit | adc91a0db30fb55b028539e10200479e6de2cdc5 (patch) | |
tree | 97974aef94c34f14c71b4823eec63ff5dacb9dbe | |
parent | 0001c2f9483100e32cf553973dbefa2b7750de69 (diff) |
Kill unused ioctl(2)s.
ok deraadt@
-rw-r--r-- | sys/dev/usb/ugen.c | 13 | ||||
-rw-r--r-- | sys/dev/usb/uhid.c | 16 | ||||
-rw-r--r-- | sys/dev/usb/umodem.c | 38 | ||||
-rw-r--r-- | sys/dev/usb/uplcom.c | 38 | ||||
-rw-r--r-- | sys/dev/usb/usb.h | 8 | ||||
-rw-r--r-- | sys/dev/usb/uticom.c | 38 |
6 files changed, 10 insertions, 141 deletions
diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c index d47483ea6e8..62eb42c1279 100644 --- a/sys/dev/usb/ugen.c +++ b/sys/dev/usb/ugen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ugen.c,v 1.93 2016/03/17 21:36:48 krw Exp $ */ +/* $OpenBSD: ugen.c,v 1.94 2016/05/24 05:35:01 mpi Exp $ */ /* $NetBSD: ugen.c,v 1.63 2002/11/26 18:49:48 christos Exp $ */ /* $FreeBSD: src/sys/dev/usb/ugen.c,v 1.26 1999/11/17 22:33:41 n_hibma Exp $ */ @@ -953,7 +953,6 @@ ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd, caddr_t addr, struct usb_endpoint_desc *ed; usb_endpoint_descriptor_t *edesc; struct usb_alt_interface *ai; - struct usb_string_desc *si; u_int8_t conf, alt; DPRINTFN(5, ("ugenioctl: cmd=%08lx\n", cmd)); @@ -1131,16 +1130,6 @@ ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd, caddr_t addr, free(cdesc, M_TEMP, 0); return (error); } - case USB_GET_STRING_DESC: - { - int len; - si = (struct usb_string_desc *)addr; - err = usbd_get_string_desc(sc->sc_udev, si->usd_string_index, - si->usd_language_id, &si->usd_desc, &len); - if (err) - return (EINVAL); - break; - } case USB_DO_REQUEST: { struct usb_ctl_request *ur = (void *)addr; diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index 0aebcd7a5dd..a47ea49c48e 100644 --- a/sys/dev/usb/uhid.c +++ b/sys/dev/usb/uhid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhid.c,v 1.65 2016/03/03 18:13:24 stefan Exp $ */ +/* $OpenBSD: uhid.c,v 1.66 2016/05/24 05:35:01 mpi Exp $ */ /* $NetBSD: uhid.c,v 1.57 2003/03/11 16:44:00 augustss Exp $ */ /* @@ -357,8 +357,7 @@ int uhid_do_ioctl(struct uhid_softc *sc, u_long cmd, caddr_t addr, int flag, struct proc *p) { - usbd_status err; - int rc, size; + int rc; DPRINTFN(2, ("uhidioctl: cmd=%lx\n", cmd)); @@ -393,17 +392,6 @@ uhid_do_ioctl(struct uhid_softc *sc, u_long cmd, caddr_t addr, (struct usb_device_info *)addr, 1); break; - case USB_GET_STRING_DESC: - { - struct usb_string_desc *si = (struct usb_string_desc *)addr; - err = usbd_get_string_desc(sc->sc_hdev.sc_udev, - si->usd_string_index, - si->usd_language_id, &si->usd_desc, &size); - if (err) - return (EINVAL); - break; - } - case USB_GET_REPORT_DESC: case USB_GET_REPORT: case USB_SET_REPORT: diff --git a/sys/dev/usb/umodem.c b/sys/dev/usb/umodem.c index b4759b83884..e18d885cc89 100644 --- a/sys/dev/usb/umodem.c +++ b/sys/dev/usb/umodem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umodem.c,v 1.59 2015/03/14 03:38:50 jsg Exp $ */ +/* $OpenBSD: umodem.c,v 1.60 2016/05/24 05:35:01 mpi Exp $ */ /* $NetBSD: umodem.c,v 1.45 2002/09/23 05:51:23 simonb Exp $ */ /* @@ -47,7 +47,6 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> -#include <sys/ioctl.h> #include <sys/conf.h> #include <sys/tty.h> #include <sys/file.h> @@ -121,7 +120,6 @@ void umodem_rts(struct umodem_softc *, int); void umodem_break(struct umodem_softc *, int); void umodem_set_line_state(struct umodem_softc *); int umodem_param(void *, int, struct termios *); -int umodem_ioctl(void *, int, u_long, caddr_t, int, struct proc *); int umodem_open(void *, int portno); void umodem_close(void *, int portno); void umodem_intr(struct usbd_xfer *, void *, usbd_status); @@ -130,7 +128,7 @@ struct ucom_methods umodem_methods = { umodem_get_status, umodem_set, umodem_param, - umodem_ioctl, + NULL, umodem_open, umodem_close, NULL, @@ -564,38 +562,6 @@ umodem_param(void *addr, int portno, struct termios *t) return (0); } -int -umodem_ioctl(void *addr, int portno, u_long cmd, caddr_t data, int flag, - struct proc *p) -{ - struct umodem_softc *sc = addr; - int error = 0; - - if (usbd_is_dying(sc->sc_udev)) - return (EIO); - - DPRINTF(("umodem_ioctl: cmd=0x%08lx\n", cmd)); - - switch (cmd) { - case USB_GET_CM_OVER_DATA: - *(int *)data = sc->sc_cm_over_data; - break; - - case USB_SET_CM_OVER_DATA: - if (*(int *)data != sc->sc_cm_over_data) { - /* XXX change it */ - } - break; - - default: - DPRINTF(("umodem_ioctl: unknown\n")); - error = ENOTTY; - break; - } - - return (error); -} - void umodem_dtr(struct umodem_softc *sc, int onoff) { diff --git a/sys/dev/usb/uplcom.c b/sys/dev/usb/uplcom.c index a7520ef359e..86e52496d9e 100644 --- a/sys/dev/usb/uplcom.c +++ b/sys/dev/usb/uplcom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uplcom.c,v 1.66 2015/03/14 03:38:50 jsg Exp $ */ +/* $OpenBSD: uplcom.c,v 1.67 2016/05/24 05:35:01 mpi Exp $ */ /* $NetBSD: uplcom.c,v 1.29 2002/09/23 05:51:23 simonb Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -119,9 +119,6 @@ void uplcom_rts(struct uplcom_softc *, int); void uplcom_break(struct uplcom_softc *, int); void uplcom_set_line_state(struct uplcom_softc *); void uplcom_get_status(void *, int portno, u_char *lsr, u_char *msr); -#if TODO -int uplcom_ioctl(void *, int, u_long, caddr_t, int, struct proc *); -#endif int uplcom_param(void *, int, struct termios *); int uplcom_open(void *, int); void uplcom_close(void *, int); @@ -130,7 +127,7 @@ struct ucom_methods uplcom_methods = { uplcom_get_status, uplcom_set, uplcom_param, - NULL, /* uplcom_ioctl, TODO */ + NULL, uplcom_open, uplcom_close, NULL, @@ -788,34 +785,3 @@ uplcom_get_status(void *addr, int portno, u_char *lsr, u_char *msr) if (msr != NULL) *msr = sc->sc_msr; } - -#if TODO -int -uplcom_ioctl(void *addr, int portno, u_long cmd, caddr_t data, int flag, - struct proc *p) -{ - struct uplcom_softc *sc = addr; - int error = 0; - - if (usbd_is_dying(sc->sc_udev)) - return (EIO); - - DPRINTF(("uplcom_ioctl: cmd=0x%08lx\n", cmd)); - - switch (cmd) { - case TIOCNOTTY: - case TIOCMGET: - case TIOCMSET: - case USB_GET_CM_OVER_DATA: - case USB_SET_CM_OVER_DATA: - break; - - default: - DPRINTF(("uplcom_ioctl: unknown\n")); - error = ENOTTY; - break; - } - - return (error); -} -#endif diff --git a/sys/dev/usb/usb.h b/sys/dev/usb/usb.h index 9c06d5ec0df..67d0cc63f1d 100644 --- a/sys/dev/usb/usb.h +++ b/sys/dev/usb/usb.h @@ -1,4 +1,4 @@ -/* $OpenBSD: usb.h,v 1.54 2016/02/28 17:57:50 stefan Exp $ */ +/* $OpenBSD: usb.h,v 1.55 2016/05/24 05:35:01 mpi 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 $ */ @@ -752,7 +752,6 @@ struct usb_device_stats { /* USB controller */ #define USB_REQUEST _IOWR('U', 1, struct usb_ctl_request) #define USB_SETDEBUG _IOW ('U', 2, unsigned int) -#define USB_DISCOVER _IO ('U', 3) #define USB_DEVICEINFO _IOWR('U', 4, struct usb_device_info) #define USB_DEVICESTATS _IOR ('U', 5, struct usb_device_stats) #define USB_DEVICE_GET_CDESC _IOWR('U', 6, struct usb_device_cdesc) @@ -776,14 +775,9 @@ struct usb_device_stats { #define USB_GET_INTERFACE_DESC _IOWR('U', 107, struct usb_interface_desc) #define USB_GET_ENDPOINT_DESC _IOWR('U', 108, struct usb_endpoint_desc) #define USB_GET_FULL_DESC _IOWR('U', 109, struct usb_full_desc) -#define USB_GET_STRING_DESC _IOWR('U', 110, struct usb_string_desc) #define USB_DO_REQUEST _IOWR('U', 111, struct usb_ctl_request) #define USB_GET_DEVICEINFO _IOR ('U', 112, struct usb_device_info) #define USB_SET_SHORT_XFER _IOW ('U', 113, int) #define USB_SET_TIMEOUT _IOW ('U', 114, int) -/* Modem device */ -#define USB_GET_CM_OVER_DATA _IOR ('U', 130, int) -#define USB_SET_CM_OVER_DATA _IOW ('U', 131, int) - #endif /* _USB_H_ */ diff --git a/sys/dev/usb/uticom.c b/sys/dev/usb/uticom.c index 280176392c8..5ee6d2f1844 100644 --- a/sys/dev/usb/uticom.c +++ b/sys/dev/usb/uticom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uticom.c,v 1.29 2016/01/08 15:54:14 jcs Exp $ */ +/* $OpenBSD: uticom.c,v 1.30 2016/05/24 05:35:01 mpi Exp $ */ /* * Copyright (c) 2005 Dmitry Komissaroff <dxi@mail.ru>. * @@ -147,9 +147,6 @@ static void uticom_dtr(struct uticom_softc *, int); static void uticom_rts(struct uticom_softc *, int); static void uticom_break(struct uticom_softc *, int); static void uticom_get_status(void *, int, u_char *, u_char *); -#if 0 /* TODO */ -static int uticom_ioctl(void *, int, u_long, caddr_t, int, usb_proc_ptr); -#endif static int uticom_param(void *, int, struct termios *); static int uticom_open(void *, int); static void uticom_close(void *, int); @@ -163,7 +160,7 @@ struct ucom_methods uticom_methods = { uticom_get_status, uticom_set, uticom_param, - NULL, /* uticom_ioctl, TODO */ + NULL, uticom_open, uticom_close, NULL, @@ -842,37 +839,6 @@ uticom_get_status(void *addr, int portno, u_char *lsr, u_char *msr) return; } -#if 0 /* TODO */ -static int -uticom_ioctl(void *addr, int portno, u_long cmd, caddr_t data, int flag, - usb_proc_ptr p) -{ - struct uticom_softc *sc = addr; - int error = 0; - - if (usbd_is_dying(sc->sc_udev)) - return (EIO); - - DPRINTF(("uticom_ioctl: cmd = 0x%08lx\n", cmd)); - - switch (cmd) { - case TIOCNOTTY: - case TIOCMGET: - case TIOCMSET: - case USB_GET_CM_OVER_DATA: - case USB_SET_CM_OVER_DATA: - break; - - default: - DPRINTF(("uticom_ioctl: unknown\n")); - error = ENOTTY; - break; - } - - return (error); -} -#endif - static int uticom_download_fw(struct uticom_softc *sc, int pipeno, struct usbd_device *dev) |