diff options
author | 2014-07-09 18:15:04 +0000 | |
---|---|---|
committer | 2014-07-09 18:15:04 +0000 | |
commit | 769226aedb150205bf26e4924b82e044a6ef39e8 (patch) | |
tree | 2f0c1c8750c31c2ccbcb8913352a9172621182a8 /sys/dev/usb/usb.c | |
parent | Better workaround for OS X sigaltstack() bug (diff) | |
download | wireguard-openbsd-769226aedb150205bf26e4924b82e044a6ef39e8.tar.xz wireguard-openbsd-769226aedb150205bf26e4924b82e044a6ef39e8.zip |
autoconf(9) is your friend and it knows you more than you think. It
even knows your children! So let him handle the seperation correctly.
Do not rewrite your own custom config_detach_children(9) and as a bonus
start removing the usbd_port tentacles from the stack.
ok pirofti@, yuo@, miod@, deraadt@
Diffstat (limited to 'sys/dev/usb/usb.c')
-rw-r--r-- | sys/dev/usb/usb.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c index 2397a2f308f..364fe7e28d8 100644 --- a/sys/dev/usb/usb.c +++ b/sys/dev/usb/usb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usb.c,v 1.97 2014/05/28 11:20:55 mpi Exp $ */ +/* $OpenBSD: usb.c,v 1.98 2014/07/09 18:15:04 mpi Exp $ */ /* $NetBSD: usb.c,v 1.77 2003/01/01 00:10:26 thorpej Exp $ */ /* @@ -849,8 +849,10 @@ usb_explore(void *v) sc->sc_bus->dying = 1; /* Make all devices disconnect. */ - if (sc->sc_port.device != NULL) - usb_disconnect_port(&sc->sc_port, (struct device *)sc); + if (sc->sc_port.device != NULL) { + usbd_detach(sc->sc_port.device, (struct device *)sc); + sc->sc_port.device = NULL; + } sc->sc_bus->flags &= ~USB_BUS_DISCONNECTING; } else { |