summaryrefslogtreecommitdiff
path: root/sys/dev/usb/if_upl.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2014-07-12 07:59:24 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2014-07-12 07:59:24 +0000
commitc42990f7fe2d5e525cb71475adda2d077752403c (patch)
tree422f980b1cbe42a1682bfaaf0f0bc115abc8f7b9 /sys/dev/usb/if_upl.c
parentb85e6728e53b3d131aae17def481c2684a281c24 (diff)
Kill a bunch of DVACT_DEACTIVATE handlers whose only purpose were to
set the 'dying' flag of a device. Such handlers are useless now that usbd_detach() already set this flag. Even if the purpose of this flag is questionnable on OpenBSD because DVACT_DEACTIVATE acts as a pre-detach event, this is just a first small step towards the simplification of the autoconf(9) device states. This cleaning is now possible thanks to the work of pirofti@ to convert all the USB drivers to properly use usbd_is_dying(). Discussed many times with deraadt@
Diffstat (limited to 'sys/dev/usb/if_upl.c')
-rw-r--r--sys/dev/usb/if_upl.c42
1 files changed, 11 insertions, 31 deletions
diff --git a/sys/dev/usb/if_upl.c b/sys/dev/usb/if_upl.c
index 8ecbcd8cedc..791f34a5780 100644
--- a/sys/dev/usb/if_upl.c
+++ b/sys/dev/usb/if_upl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_upl.c,v 1.56 2014/01/07 09:54:18 mpi Exp $ */
+/* $OpenBSD: if_upl.c,v 1.57 2014/07/12 07:59:23 mpi Exp $ */
/* $NetBSD: if_upl.c,v 1.19 2002/07/11 21:14:26 augustss Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -158,21 +158,16 @@ struct usb_devno upl_devs[] = {
{ USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2302 }
};
-int upl_match(struct device *, void *, void *);
-void upl_attach(struct device *, struct device *, void *);
-int upl_detach(struct device *, int);
-int upl_activate(struct device *, int);
-
-struct cfdriver upl_cd = {
- NULL, "upl", DV_IFNET
-};
-
-const struct cfattach upl_ca = {
- sizeof(struct upl_softc),
- upl_match,
- upl_attach,
- upl_detach,
- upl_activate,
+int upl_match(struct device *, void *, void *);
+void upl_attach(struct device *, struct device *, void *);
+int upl_detach(struct device *, int);
+
+struct cfdriver upl_cd = {
+ NULL, "upl", DV_IFNET
+};
+
+const struct cfattach upl_ca = {
+ sizeof(struct upl_softc), upl_match, upl_attach, upl_detach
};
int upl_openpipes(struct upl_softc *);
@@ -324,21 +319,6 @@ upl_detach(struct device *self, int flags)
return (0);
}
-int
-upl_activate(struct device *self, int act)
-{
- struct upl_softc *sc = (struct upl_softc *)self;
-
- DPRINTFN(2,("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__));
-
- switch (act) {
- case DVACT_DEACTIVATE:
- usbd_deactivate(sc->sc_udev);
- break;
- }
- return (0);
-}
-
/*
* Initialize an RX descriptor and attach an MBUF cluster.
*/