summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/usb_port.h2
-rw-r--r--sys/dev/usb/usb_subr.c8
2 files changed, 3 insertions, 7 deletions
diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h
index 20ff88c..8c0ddae 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 966e738..73eb908 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
-
}
}
OpenPOWER on IntegriCloud