diff options
| author | Josef Karthauser <joe@FreeBSD.org> | 2002-04-02 14:14:14 +0000 |
|---|---|---|
| committer | Josef Karthauser <joe@FreeBSD.org> | 2002-04-02 14:14:14 +0000 |
| commit | 54d369e6e5bf31540bb2af8d998b65821170528e (patch) | |
| tree | 123c85c879f55d786f3d09cde6d2fe4941a4f2fe | |
| parent | e92dc1d513e8e054a307df847d03002ef392901f (diff) | |
Notes
| -rw-r--r-- | sys/dev/usb/usb_port.h | 2 | ||||
| -rw-r--r-- | sys/dev/usb/usb_subr.c | 8 |
2 files changed, 3 insertions, 7 deletions
diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h index 20ff88cd2860..8c0ddae20ba7 100644 --- a/sys/dev/usb/usb_port.h +++ b/sys/dev/usb/usb_port.h @@ -345,6 +345,8 @@ typedef struct callout usb_callout_t; #define PWR_RESUME 0 #define PWR_SUSPEND 1 +#define config_detach(dev, flag) device_delete_child(device_get_parent(dev), dev) + typedef struct malloc_type *usb_malloc_type; #define USB_DECLARE_DRIVER_INIT(dname, init...) \ diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c index 966e7385e6c6..73eb90884b31 100644 --- a/sys/dev/usb/usb_subr.c +++ b/sys/dev/usb/usb_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: usb_subr.c,v 1.87 2001/08/15 00:04:59 augustss Exp $ */ +/* $NetBSD: usb_subr.c,v 1.88 2001/11/10 16:53:32 augustss Exp $ */ /* $FreeBSD$ */ /* @@ -1306,13 +1306,7 @@ usb_disconnect_port(struct usbd_port *up, device_ptr_t parent) if (up->portno != 0) printf(" port %d", up->portno); printf(" (addr %d) disconnected\n", dev->address); -#if defined(__NetBSD__) || defined(__OpenBSD__) config_detach(dev->subdevs[i], DETACH_FORCE); -#elif defined(__FreeBSD__) - device_delete_child(device_get_parent(dev->subdevs[i]), - dev->subdevs[i]); -#endif - } } |
