summaryrefslogtreecommitdiff
path: root/sys/dev/usb/if_upgt.c
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2010-12-06 04:41:41 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2010-12-06 04:41:41 +0000
commit586226f2be8916cb9799bd7c4c47749b6f386d52 (patch)
tree0345ca9864b3287f60b7d747fc92d9727488e4fb /sys/dev/usb/if_upgt.c
parentc771dfeb92ac7c03200839673dde83bd36b2ec0e (diff)
* replace per-driver dying and/or other state variables with use of
usbd_deactivete() and usbd_is_dying() * use usbd_deactivate() in activate()/DEACTIVATE * convert a few more direct checks of the associated bus' dying flag with usbd_is_dying()
Diffstat (limited to 'sys/dev/usb/if_upgt.c')
-rw-r--r--sys/dev/usb/if_upgt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/usb/if_upgt.c b/sys/dev/usb/if_upgt.c
index f2ad877c507..7ef4965a571 100644
--- a/sys/dev/usb/if_upgt.c
+++ b/sys/dev/usb/if_upgt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_upgt.c,v 1.53 2010/10/27 17:51:11 jakemsr Exp $ */
+/* $OpenBSD: if_upgt.c,v 1.54 2010/12/06 04:41:39 jakemsr Exp $ */
/*
* Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org>
@@ -454,9 +454,6 @@ upgt_attach_hook(void *arg)
printf("%s: address %s\n",
sc->sc_dev.dv_xname, ether_sprintf(ic->ic_myaddr));
- /* device attached */
- sc->sc_flags |= UPGT_DEVICE_ATTACHED;
-
return;
fail:
printf("%s: %s failed!\n", sc->sc_dev.dv_xname, __func__);
@@ -515,10 +512,13 @@ upgt_detach(struct device *self, int flags)
int
upgt_activate(struct device *self, int act)
{
+ struct upgt_softc *sc = (struct upgt_softc *)self;
+
switch (act) {
case DVACT_ACTIVATE:
break;
case DVACT_DEACTIVATE:
+ usbd_deactivate(sc->sc_udev);
break;
}