From 84f0598ea068699203f5034e35f74e9571f73d5f Mon Sep 17 00:00:00 2001 From: mpi Date: Sat, 12 Jul 2014 21:24:33 +0000 Subject: [PATCH] Kill the last dumb DVACT_DEACTIVATE handlers. --- sys/dev/usb/moscom.c | 40 +++++++++++----------------------------- sys/dev/usb/umsm.c | 22 ++-------------------- sys/dev/usb/uplcom.c | 40 +++++++++++----------------------------- sys/dev/usb/urio.c | 40 +++++++++++----------------------------- sys/dev/usb/uscom.c | 40 +++++++++++----------------------------- sys/dev/usb/uslcom.c | 40 +++++++++++----------------------------- sys/dev/usb/usps.c | 22 ++-------------------- sys/dev/usb/uticom.c | 22 ++-------------------- sys/dev/usb/uvisor.c | 40 +++++++++++----------------------------- sys/dev/usb/uvscom.c | 40 +++++++++++----------------------------- 10 files changed, 83 insertions(+), 263 deletions(-) diff --git a/sys/dev/usb/moscom.c b/sys/dev/usb/moscom.c index 0bbc2f92ed2..bc2b55855d0 100644 --- a/sys/dev/usb/moscom.c +++ b/sys/dev/usb/moscom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: moscom.c,v 1.19 2013/11/15 08:25:30 pirofti Exp $ */ +/* $OpenBSD: moscom.c,v 1.20 2014/07/12 21:24:33 mpi Exp $ */ /* * Copyright (c) 2006 Jonathan Gray @@ -163,21 +163,16 @@ static const struct usb_devno moscom_devs[] = { { USB_VENDOR_MOSCHIP, USB_PRODUCT_MOSCHIP_MCS7703 } }; -int moscom_match(struct device *, void *, void *); -void moscom_attach(struct device *, struct device *, void *); -int moscom_detach(struct device *, int); -int moscom_activate(struct device *, int); - -struct cfdriver moscom_cd = { - NULL, "moscom", DV_DULL -}; - -const struct cfattach moscom_ca = { - sizeof(struct moscom_softc), - moscom_match, - moscom_attach, - moscom_detach, - moscom_activate, +int moscom_match(struct device *, void *, void *); +void moscom_attach(struct device *, struct device *, void *); +int moscom_detach(struct device *, int); + +struct cfdriver moscom_cd = { + NULL, "moscom", DV_DULL +}; + +const struct cfattach moscom_ca = { + sizeof(struct moscom_softc), moscom_match, moscom_attach, moscom_detach }; int @@ -276,19 +271,6 @@ moscom_detach(struct device *self, int flags) return (rv); } -int -moscom_activate(struct device *self, int act) -{ - struct moscom_softc *sc = (struct moscom_softc *)self; - - switch (act) { - case DVACT_DEACTIVATE: - usbd_deactivate(sc->sc_udev); - break; - } - return (0); -} - int moscom_open(void *vsc, int portno) { diff --git a/sys/dev/usb/umsm.c b/sys/dev/usb/umsm.c index 9737f9afe3b..afde572f14c 100644 --- a/sys/dev/usb/umsm.c +++ b/sys/dev/usb/umsm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umsm.c,v 1.99 2014/07/12 18:48:52 tedu Exp $ */ +/* $OpenBSD: umsm.c,v 1.100 2014/07/12 21:24:33 mpi Exp $ */ /* * Copyright (c) 2008 Yojiro UO @@ -53,7 +53,6 @@ int umsmdebug = 0; int umsm_match(struct device *, void *, void *); void umsm_attach(struct device *, struct device *, void *); int umsm_detach(struct device *, int); -int umsm_activate(struct device *, int); int umsm_open(void *, int); void umsm_close(void *, int); @@ -268,11 +267,7 @@ struct cfdriver umsm_cd = { }; const struct cfattach umsm_ca = { - sizeof(struct umsm_softc), - umsm_match, - umsm_attach, - umsm_detach, - umsm_activate, + sizeof(struct umsm_softc), umsm_match, umsm_attach, umsm_detach }; int @@ -432,19 +427,6 @@ umsm_detach(struct device *self, int flags) return (rv); } -int -umsm_activate(struct device *self, int act) -{ - struct umsm_softc *sc = (struct umsm_softc *)self; - - switch (act) { - case DVACT_DEACTIVATE: - usbd_deactivate(sc->sc_udev); - break; - } - return (0); -} - int umsm_open(void *addr, int portno) { diff --git a/sys/dev/usb/uplcom.c b/sys/dev/usb/uplcom.c index ef43afcaf3b..001b0950ef4 100644 --- a/sys/dev/usb/uplcom.c +++ b/sys/dev/usb/uplcom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uplcom.c,v 1.63 2014/07/12 18:48:52 tedu Exp $ */ +/* $OpenBSD: uplcom.c,v 1.64 2014/07/12 21:24:33 mpi Exp $ */ /* $NetBSD: uplcom.c,v 1.29 2002/09/23 05:51:23 simonb Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -183,21 +183,16 @@ static const struct usb_devno uplcom_devs[] = { }; #define uplcom_lookup(v, p) usb_lookup(uplcom_devs, v, p) -int uplcom_match(struct device *, void *, void *); -void uplcom_attach(struct device *, struct device *, void *); -int uplcom_detach(struct device *, int); -int uplcom_activate(struct device *, int); - -struct cfdriver uplcom_cd = { - NULL, "uplcom", DV_DULL -}; - -const struct cfattach uplcom_ca = { - sizeof(struct uplcom_softc), - uplcom_match, - uplcom_attach, - uplcom_detach, - uplcom_activate, +int uplcom_match(struct device *, void *, void *); +void uplcom_attach(struct device *, struct device *, void *); +int uplcom_detach(struct device *, int); + +struct cfdriver uplcom_cd = { + NULL, "uplcom", DV_DULL +}; + +const struct cfattach uplcom_ca = { + sizeof(struct uplcom_softc), uplcom_match, uplcom_attach, uplcom_detach }; int @@ -434,19 +429,6 @@ uplcom_detach(struct device *self, int flags) return (rv); } -int -uplcom_activate(struct device *self, int act) -{ - struct uplcom_softc *sc = (struct uplcom_softc *)self; - - switch (act) { - case DVACT_DEACTIVATE: - usbd_deactivate(sc->sc_udev); - break; - } - return (0); -} - usbd_status uplcom_reset(struct uplcom_softc *sc) { diff --git a/sys/dev/usb/urio.c b/sys/dev/usb/urio.c index 0524914dac4..6dc1d4917fd 100644 --- a/sys/dev/usb/urio.c +++ b/sys/dev/usb/urio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: urio.c,v 1.45 2014/07/12 18:48:52 tedu Exp $ */ +/* $OpenBSD: urio.c,v 1.46 2014/07/12 21:24:33 mpi Exp $ */ /* $NetBSD: urio.c,v 1.15 2002/10/23 09:14:02 jdolecek Exp $ */ /* @@ -93,21 +93,16 @@ static const struct usb_devno urio_devs[] = { { USB_VENDOR_DIAMOND2, USB_PRODUCT_DIAMOND2_PSAPLAY120}, }; -int urio_match(struct device *, void *, void *); -void urio_attach(struct device *, struct device *, void *); -int urio_detach(struct device *, int); -int urio_activate(struct device *, int); - -struct cfdriver urio_cd = { - NULL, "urio", DV_DULL -}; - -const struct cfattach urio_ca = { - sizeof(struct urio_softc), - urio_match, - urio_attach, - urio_detach, - urio_activate, +int urio_match(struct device *, void *, void *); +void urio_attach(struct device *, struct device *, void *); +int urio_detach(struct device *, int); + +struct cfdriver urio_cd = { + NULL, "urio", DV_DULL +}; + +const struct cfattach urio_ca = { + sizeof(struct urio_softc), urio_match, urio_attach, urio_detach }; int @@ -223,19 +218,6 @@ urio_detach(struct device *self, int flags) return (0); } -int -urio_activate(struct device *self, int act) -{ - struct urio_softc *sc = (struct urio_softc *)self; - - switch (act) { - case DVACT_DEACTIVATE: - usbd_deactivate(sc->sc_udev); - break; - } - return (0); -} - int urioopen(dev_t dev, int flag, int mode, struct proc *p) { diff --git a/sys/dev/usb/uscom.c b/sys/dev/usb/uscom.c index 9e4cf5bde23..893fef10c37 100644 --- a/sys/dev/usb/uscom.c +++ b/sys/dev/usb/uscom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uscom.c,v 1.1 2014/03/25 03:29:23 jsg Exp $ */ +/* $OpenBSD: uscom.c,v 1.2 2014/07/12 21:24:33 mpi Exp $ */ /* * Copyright (c) 2006 Jonathan Gray @@ -57,21 +57,16 @@ static const struct usb_devno uscom_devs[] = { { USB_VENDOR_HP, USB_PRODUCT_HP_HPX9GP } }; -int uscom_match(struct device *, void *, void *); -void uscom_attach(struct device *, struct device *, void *); -int uscom_detach(struct device *, int); -int uscom_activate(struct device *, int); - -struct cfdriver uscom_cd = { - NULL, "uscom", DV_DULL -}; - -const struct cfattach uscom_ca = { - sizeof(struct uscom_softc), - uscom_match, - uscom_attach, - uscom_detach, - uscom_activate, +int uscom_match(struct device *, void *, void *); +void uscom_attach(struct device *, struct device *, void *); +int uscom_detach(struct device *, int); + +struct cfdriver uscom_cd = { + NULL, "uscom", DV_DULL +}; + +const struct cfattach uscom_ca = { + sizeof(struct uscom_softc), uscom_match, uscom_attach, uscom_detach }; int @@ -169,16 +164,3 @@ uscom_detach(struct device *self, int flags) return (rv); } - -int -uscom_activate(struct device *self, int act) -{ - struct uscom_softc *sc = (struct uscom_softc *)self; - - switch (act) { - case DVACT_DEACTIVATE: - usbd_deactivate(sc->sc_udev); - break; - } - return (0); -} diff --git a/sys/dev/usb/uslcom.c b/sys/dev/usb/uslcom.c index eae0879c937..c0c421206b7 100644 --- a/sys/dev/usb/uslcom.c +++ b/sys/dev/usb/uslcom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uslcom.c,v 1.30 2013/11/15 08:25:31 pirofti Exp $ */ +/* $OpenBSD: uslcom.c,v 1.31 2014/07/12 21:24:33 mpi Exp $ */ /* * Copyright (c) 2006 Jonathan Gray @@ -221,21 +221,16 @@ static const struct usb_devno uslcom_devs[] = { { USB_VENDOR_WIENERPLEINBAUS, USB_PRODUCT_WIENERPLEINBAUS_RCM }, }; -int uslcom_match(struct device *, void *, void *); -void uslcom_attach(struct device *, struct device *, void *); -int uslcom_detach(struct device *, int); -int uslcom_activate(struct device *, int); - -struct cfdriver uslcom_cd = { - NULL, "uslcom", DV_DULL -}; - -const struct cfattach uslcom_ca = { - sizeof(struct uslcom_softc), - uslcom_match, - uslcom_attach, - uslcom_detach, - uslcom_activate, +int uslcom_match(struct device *, void *, void *); +void uslcom_attach(struct device *, struct device *, void *); +int uslcom_detach(struct device *, int); + +struct cfdriver uslcom_cd = { + NULL, "uslcom", DV_DULL +}; + +const struct cfattach uslcom_ca = { + sizeof(struct uslcom_softc), uslcom_match, uslcom_attach, uslcom_detach }; int @@ -334,19 +329,6 @@ uslcom_detach(struct device *self, int flags) return (rv); } -int -uslcom_activate(struct device *self, int act) -{ - struct uslcom_softc *sc = (struct uslcom_softc *)self; - - switch (act) { - case DVACT_DEACTIVATE: - usbd_deactivate(sc->sc_udev); - break; - } - return (0); -} - int uslcom_open(void *vsc, int portno) { diff --git a/sys/dev/usb/usps.c b/sys/dev/usb/usps.c index 1f47fca9bad..259a047d5b0 100644 --- a/sys/dev/usb/usps.c +++ b/sys/dev/usb/usps.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usps.c,v 1.6 2014/07/12 18:48:53 tedu Exp $ */ +/* $OpenBSD: usps.c,v 1.7 2014/07/12 21:24:33 mpi Exp $ */ /* * Copyright (c) 2011 Yojiro UO @@ -110,7 +110,6 @@ static const struct usb_devno usps_devs[] = { int usps_match(struct device *, void *, void *); void usps_attach(struct device *, struct device *, void *); int usps_detach(struct device *, int); -int usps_activate(struct device *, int); void usps_intr(struct usbd_xfer *, void *, usbd_status); usbd_status usps_cmd(struct usps_softc *, uint8_t, uint16_t, uint16_t); @@ -127,11 +126,7 @@ struct cfdriver usps_cd = { }; const struct cfattach usps_ca = { - sizeof(struct usps_softc), - usps_match, - usps_attach, - usps_detach, - usps_activate, + sizeof(struct usps_softc), usps_match, usps_attach, usps_detach }; int @@ -341,19 +336,6 @@ usps_detach(struct device *self, int flags) return (rv); } -int -usps_activate(struct device *self, int act) -{ - struct usps_softc *sc = (struct usps_softc *)self; - - switch (act) { - case DVACT_DEACTIVATE: - usbd_deactivate(sc->sc_udev); - break; - } - return (0); -} - usbd_status usps_cmd(struct usps_softc *sc, uint8_t cmd, uint16_t val, uint16_t len) { diff --git a/sys/dev/usb/uticom.c b/sys/dev/usb/uticom.c index d214c6485fe..135e769fc2d 100644 --- a/sys/dev/usb/uticom.c +++ b/sys/dev/usb/uticom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uticom.c,v 1.25 2014/07/12 18:48:53 tedu Exp $ */ +/* $OpenBSD: uticom.c,v 1.26 2014/07/12 21:24:33 mpi Exp $ */ /* * Copyright (c) 2005 Dmitry Komissaroff . * @@ -175,18 +175,13 @@ struct ucom_methods uticom_methods = { int uticom_match(struct device *, void *, void *); void uticom_attach(struct device *, struct device *, void *); int uticom_detach(struct device *, int); -int uticom_activate(struct device *, int); struct cfdriver uticom_cd = { NULL, "uticom", DV_DULL }; const struct cfattach uticom_ca = { - sizeof(struct uticom_softc), - uticom_match, - uticom_attach, - uticom_detach, - uticom_activate, + sizeof(struct uticom_softc), uticom_match, uticom_attach, uticom_detach }; static const struct usb_devno uticom_devs[] = { @@ -457,19 +452,6 @@ fwload_done: sc->sc_subdev = config_found_sm((struct device *)sc, &uca, ucomprint, ucomsubmatch); } -int -uticom_activate(struct device *self, int act) -{ - struct uticom_softc *sc = (struct uticom_softc *)self; - - switch (act) { - case DVACT_DEACTIVATE: - usbd_deactivate(sc->sc_udev); - break; - } - return (0); -} - int uticom_detach(struct device *self, int flags) { diff --git a/sys/dev/usb/uvisor.c b/sys/dev/usb/uvisor.c index 1ff82b0d30b..7640c931cf3 100644 --- a/sys/dev/usb/uvisor.c +++ b/sys/dev/usb/uvisor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvisor.c,v 1.48 2013/11/15 08:25:31 pirofti Exp $ */ +/* $OpenBSD: uvisor.c,v 1.49 2014/07/12 21:24:33 mpi Exp $ */ /* $NetBSD: uvisor.c,v 1.21 2003/08/03 21:59:26 nathanw Exp $ */ /* @@ -193,21 +193,16 @@ static const struct uvisor_type uvisor_devs[] = { }; #define uvisor_lookup(v, p) ((struct uvisor_type *)usb_lookup(uvisor_devs, v, p)) -int uvisor_match(struct device *, void *, void *); -void uvisor_attach(struct device *, struct device *, void *); -int uvisor_detach(struct device *, int); -int uvisor_activate(struct device *, int); - -struct cfdriver uvisor_cd = { - NULL, "uvisor", DV_DULL -}; - -const struct cfattach uvisor_ca = { - sizeof(struct uvisor_softc), - uvisor_match, - uvisor_attach, - uvisor_detach, - uvisor_activate, +int uvisor_match(struct device *, void *, void *); +void uvisor_attach(struct device *, struct device *, void *); +int uvisor_detach(struct device *, int); + +struct cfdriver uvisor_cd = { + NULL, "uvisor", DV_DULL +}; + +const struct cfattach uvisor_ca = { + sizeof(struct uvisor_softc), uvisor_match, uvisor_attach, uvisor_detach }; int @@ -373,19 +368,6 @@ bad: usbd_deactivate(sc->sc_udev); } -int -uvisor_activate(struct device *self, int act) -{ - struct uvisor_softc *sc = (struct uvisor_softc *)self; - - switch (act) { - case DVACT_DEACTIVATE: - usbd_deactivate(sc->sc_udev); - break; - } - return (0); -} - int uvisor_detach(struct device *self, int flags) { diff --git a/sys/dev/usb/uvscom.c b/sys/dev/usb/uvscom.c index e14b30606ab..ce431f80012 100644 --- a/sys/dev/usb/uvscom.c +++ b/sys/dev/usb/uvscom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvscom.c,v 1.31 2014/07/12 18:48:53 tedu Exp $ */ +/* $OpenBSD: uvscom.c,v 1.32 2014/07/12 21:24:33 mpi Exp $ */ /* $NetBSD: uvscom.c,v 1.9 2003/02/12 15:36:20 ichiro Exp $ */ /*- * Copyright (c) 2001-2002, Shunsuke Akiyama . @@ -203,21 +203,16 @@ static const struct usb_devno uvscom_devs [] = { { USB_VENDOR_SUNTAC, USB_PRODUCT_SUNTAC_IS96U }, }; -int uvscom_match(struct device *, void *, void *); -void uvscom_attach(struct device *, struct device *, void *); -int uvscom_detach(struct device *, int); -int uvscom_activate(struct device *, int); - -struct cfdriver uvscom_cd = { - NULL, "uvscom", DV_DULL -}; - -const struct cfattach uvscom_ca = { - sizeof(struct uvscom_softc), - uvscom_match, - uvscom_attach, - uvscom_detach, - uvscom_activate, +int uvscom_match(struct device *, void *, void *); +void uvscom_attach(struct device *, struct device *, void *); +int uvscom_detach(struct device *, int); + +struct cfdriver uvscom_cd = { + NULL, "uvscom", DV_DULL +}; + +const struct cfattach uvscom_ca = { + sizeof(struct uvscom_softc), uvscom_match, uvscom_attach, uvscom_detach }; int @@ -384,19 +379,6 @@ uvscom_detach(struct device *self, int flags) return (rv); } -int -uvscom_activate(struct device *self, int act) -{ - struct uvscom_softc *sc = (struct uvscom_softc *)self; - - switch (act) { - case DVACT_DEACTIVATE: - usbd_deactivate(sc->sc_udev); - break; - } - return (0); -} - usbd_status uvscom_readstat(struct uvscom_softc *sc) { -- 2.20.1