Date: Wed, 11 Dec 2019 19:40:31 +0000 (UTC) From: Emmanuel Vadot <manu@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r355629 - head/sys/dev/mmc/host Message-ID: <201912111940.xBBJeVH5051010@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: manu Date: Wed Dec 11 19:40:30 2019 New Revision: 355629 URL: https://svnweb.freebsd.org/changeset/base/355629 Log: 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 Modified: head/sys/dev/mmc/host/dwmmc.c Modified: head/sys/dev/mmc/host/dwmmc.c ============================================================================== --- head/sys/dev/mmc/host/dwmmc.c Wed Dec 11 19:32:52 2019 (r355628) +++ head/sys/dev/mmc/host/dwmmc.c Wed Dec 11 19:40:30 2019 (r355629) @@ -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); @@ -765,12 +765,6 @@ dwmmc_detach(device_t dev) return (ret); } 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912111940.xBBJeVH5051010>