Small portability improvement.

This commit is contained in:
augustss 2001-11-10 16:53:32 +00:00
parent c64847f048
commit 02186d8353
2 changed files with 6 additions and 8 deletions

View File

@ -1,5 +1,5 @@
/* $OpenBSD: usb_port.h,v 1.18 2000/09/06 22:42:10 rahnds Exp $ */
/* $NetBSD: usb_port.h,v 1.44 2001/05/14 20:35:29 bouyer Exp $ */
/* $NetBSD: usb_port.h,v 1.45 2001/11/10 16:53:32 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_port.h,v 1.21 1999/11/17 22:33:47 n_hibma Exp $ */
/*
@ -57,6 +57,7 @@
#ifdef USB_DEBUG
#define UKBD_DEBUG 1
#define UHIDEV_DEBUG 1
#define UHID_DEBUG 1
#define OHCI_DEBUG 1
#define UGEN_DEBUG 1
@ -79,6 +80,7 @@
#define UFTDI_DEBUG 1
#define USCANNER_DEBUG 1
#define USSCANNER_DEBUG 1
#define EHCI_DEBUG 1
#define Static
#else
#define Static static
@ -417,6 +419,8 @@ typedef struct callout_handle usb_callout_t;
#define powerhook_disestablish(hdl)
#define PWR_RESUME 0
#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) \

View File

@ -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: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */
/*
@ -1305,13 +1305,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
}
}