diff options
author | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2010-12-06 04:41:41 +0000 |
---|---|---|
committer | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2010-12-06 04:41:41 +0000 |
commit | 586226f2be8916cb9799bd7c4c47749b6f386d52 (patch) | |
tree | 0345ca9864b3287f60b7d747fc92d9727488e4fb /sys/dev/usb/if_uath.c | |
parent | c771dfeb92ac7c03200839673dde83bd36b2ec0e (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_uath.c')
-rw-r--r-- | sys/dev/usb/if_uath.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/usb/if_uath.c b/sys/dev/usb/if_uath.c index c5745a41a70..7958a99ed83 100644 --- a/sys/dev/usb/if_uath.c +++ b/sys/dev/usb/if_uath.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_uath.c,v 1.46 2010/10/27 17:51:11 jakemsr Exp $ */ +/* $OpenBSD: if_uath.c,v 1.47 2010/12/06 04:41:39 jakemsr Exp $ */ /*- * Copyright (c) 2006 @@ -427,6 +427,7 @@ fail4: uath_free_tx_data_list(sc); fail3: uath_free_rx_cmd_list(sc); fail2: uath_free_tx_cmd_list(sc); fail1: uath_close_pipes(sc); + usbd_deactivate(sc->sc_udev); } int @@ -2130,11 +2131,14 @@ fail1: return error; int uath_activate(struct device *self, int act) { + struct uath_softc *sc = (struct uath_softc *)self; + switch (act) { case DVACT_ACTIVATE: break; case DVACT_DEACTIVATE: + usbd_deactivate(sc->sc_udev); break; } return 0; |