config_detach is just used in one place, so expand it inline.
This commit is contained in:
parent
34a9edafbc
commit
6f93a78c1a
@ -85,14 +85,6 @@ typedef struct callout usb_callout_t;
|
||||
#define PWR_RESUME 0
|
||||
#define PWR_SUSPEND 1
|
||||
|
||||
#define config_detach(dev, flag) \
|
||||
do { \
|
||||
struct usb_attach_arg *uaap = device_get_ivars(dev); \
|
||||
device_detach(dev); \
|
||||
free(uaap, M_USB); \
|
||||
device_delete_child(device_get_parent(dev), dev); \
|
||||
} while (0)
|
||||
|
||||
typedef struct malloc_type *usb_malloc_type;
|
||||
|
||||
#define USB_DECLARE_DRIVER_INIT(dname, init...) \
|
||||
|
@ -1363,7 +1363,12 @@ usb_disconnect_port(struct usbd_port *up, device_t parent)
|
||||
if (up->portno != 0)
|
||||
printf(" port %d", up->portno);
|
||||
printf(" (addr %d) disconnected\n", dev->address);
|
||||
config_detach(dev->subdevs[i], DETACH_FORCE);
|
||||
struct usb_attach_arg *uaap =
|
||||
device_get_ivars(dev->subdevs[i]);
|
||||
device_detach(dev);
|
||||
free(uaap, M_USB);
|
||||
device_delete_child(device_get_parent(dev->subdevs[i]),
|
||||
dev->subdevs[i]);
|
||||
dev->subdevs[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user