Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150412118
D47973.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
767 B
Referenced Files
None
Subscribers
None
D47973.diff
View Options
diff --git a/sys/dev/mfi/mfi_pci.c b/sys/dev/mfi/mfi_pci.c
--- a/sys/dev/mfi/mfi_pci.c
+++ b/sys/dev/mfi/mfi_pci.c
@@ -279,8 +279,7 @@
mfi_pci_detach(device_t dev)
{
struct mfi_softc *sc;
- int error, devcount, i;
- device_t *devlist;
+ int error;
sc = device_get_softc(dev);
@@ -294,13 +293,11 @@
sc->mfi_detaching = 1;
mtx_unlock(&sc->mfi_io_lock);
- if ((error = device_get_children(sc->mfi_dev, &devlist, &devcount)) != 0) {
+ error = bus_generic_detach(sc->mfi_dev);
+ if (error != 0) {
sx_xunlock(&sc->mfi_config_lock);
return error;
}
- for (i = 0; i < devcount; i++)
- device_delete_child(sc->mfi_dev, devlist[i]);
- free(devlist, M_TEMP);
sx_xunlock(&sc->mfi_config_lock);
EVENTHANDLER_DEREGISTER(shutdown_final, sc->mfi_eh);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 2, 12:24 AM (6 h, 58 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30695521
Default Alt Text
D47973.diff (767 B)
Attached To
Mode
D47973: mfi: Use bus_generic_detach to simplify deleting children during detach
Attached
Detach File
Event Timeline
Log In to Comment