summaryrefslogtreecommitdiff
path: root/sys/dev/usb/if_urndis.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_urndis.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_urndis.c')
-rw-r--r--sys/dev/usb/if_urndis.c26
1 files changed, 2 insertions, 24 deletions
diff --git a/sys/dev/usb/if_urndis.c b/sys/dev/usb/if_urndis.c
index 48b4a4bcfe2..9cc6d7e1017 100644
--- a/sys/dev/usb/if_urndis.c
+++ b/sys/dev/usb/if_urndis.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_urndis.c,v 1.46 2013/12/09 15:45:29 pirofti Exp $ */
+/* $OpenBSD: if_urndis.c,v 1.47 2014/07/12 07:59:23 mpi Exp $ */
/*
* Copyright (c) 2010 Jonathan Armani <armani@openbsd.org>
@@ -115,18 +115,13 @@ const struct urndis_class *urndis_lookup(usb_interface_descriptor_t *);
int urndis_match(struct device *, void *, void *);
void urndis_attach(struct device *, struct device *, void *);
int urndis_detach(struct device *, int);
-int urndis_activate(struct device *, int);
struct cfdriver urndis_cd = {
NULL, "urndis", DV_IFNET
};
struct cfattach urndis_ca = {
- sizeof(struct urndis_softc),
- urndis_match,
- urndis_attach,
- urndis_detach,
- urndis_activate,
+ sizeof(struct urndis_softc), urndis_match, urndis_attach, urndis_detach
};
const struct urndis_class {
@@ -1510,20 +1505,3 @@ urndis_detach(struct device *self, int flags)
return 0;
}
-
-int
-urndis_activate(struct device *self, int devact)
-{
- struct urndis_softc *sc;
-
- sc = (struct urndis_softc *)self;
-
- switch (devact) {
- case DVACT_DEACTIVATE:
- usbd_deactivate(sc->sc_udev);
- break;
- }
-
- return 0;
-}
-