diff options
author | joe <joe@FreeBSD.org> | 2002-04-02 14:14:14 +0000 |
---|---|---|
committer | joe <joe@FreeBSD.org> | 2002-04-02 14:14:14 +0000 |
commit | 58c7211f230a221bb4f6408cbb67f37f13a24537 (patch) | |
tree | 123c85c879f55d786f3d09cde6d2fe4941a4f2fe /sys/dev | |
parent | bd5b0c32fd2fb16434cc0af4c98969fe540fadbe (diff) | |
download | FreeBSD-src-58c7211f230a221bb4f6408cbb67f37f13a24537.zip FreeBSD-src-58c7211f230a221bb4f6408cbb67f37f13a24537.tar.gz |
MFNetBSD: usb_port.h (1.45 partial), usb_subr.c (1.88)
date: 2001/11/10 16:53:32; author: augustss;
Small portability improvement.
Diffstat (limited to 'sys/dev')
-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 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 - } } |