From 07dbde6777f2861e380f81f84baf1ca63a3996e9 Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Wed, 14 Jan 2015 14:04:29 +0000 Subject: Add a kernel function to delist our kernel character devices, so that the device name can be re-used right away in case we are destroying the character devices in the background. MFC after: 4 days Reported by: dchagin@ --- sys/dev/usb/usb_device.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys/dev/usb/usb_device.c') diff --git a/sys/dev/usb/usb_device.c b/sys/dev/usb/usb_device.c index e1ab2799c6c9..b3b46b366691 100644 --- a/sys/dev/usb/usb_device.c +++ b/sys/dev/usb/usb_device.c @@ -2019,7 +2019,10 @@ usb_destroy_dev(struct usb_fs_privdata *pd) usb_destroy_dev_sync(pd); return; } - + + /* make sure we can re-use the device name */ + delist_dev(pd->cdev); + USB_BUS_LOCK(bus); LIST_INSERT_HEAD(&bus->pd_cleanup_list, pd, pd_next); /* get cleanup going */ -- cgit v1.2.3