dwmmc: Use device_delete_children
Instead of first detaching the children(s) and then delete them, use the device_delete_children function that does all of that. MFC after: 1 month Suggested by: ian
This commit is contained in:
parent
0d80770c71
commit
5757a34c7a
@ -752,7 +752,7 @@ dwmmc_detach(device_t dev)
|
||||
|
||||
sc = device_get_softc(dev);
|
||||
|
||||
ret = bus_generic_detach(dev);
|
||||
ret = device_delete_children(dev);
|
||||
if (ret != 0)
|
||||
return (ret);
|
||||
|
||||
@ -766,12 +766,6 @@ dwmmc_detach(device_t dev)
|
||||
}
|
||||
bus_release_resources(dev, dwmmc_spec, sc->res);
|
||||
|
||||
if (sc->child) {
|
||||
ret = device_delete_child(dev, sc->child);
|
||||
if (ret != 0)
|
||||
return (ret);
|
||||
}
|
||||
|
||||
DWMMC_LOCK_DESTROY(sc);
|
||||
|
||||
#ifdef EXT_RESOURCES
|
||||
|
Loading…
Reference in New Issue
Block a user