MFNetBSD: usb_port.h (1.45 partial), usb_subr.c (1.88)

date: 2001/11/10 16:53:32;  author: augustss;
    Small portability improvement.
This commit is contained in:
Josef Karthauser 2002-04-02 14:14:14 +00:00
parent e92dc1d513
commit 54d369e6e5
2 changed files with 3 additions and 7 deletions

View File

@ -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...) \

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$ */
/*
@ -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
}
}