---
name: "BUS_CHILD_DETACHED"
section: "9"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/BUS_CHILD_DETACHED"
---

# BUS\_CHILD\_DETACHED(9)

notify a bus device that a child was detached

## NAME

**BUS\_CHILD\_DETACHED** – notify a bus device that a child was detached

## SYNOPSIS

**#include \<sys/param.h\>**

**#include \<sys/bus.h\>**

*void*\

**BUS\_CHILD\_DETACHED**(*device\_t dev*, *device\_t child*);

## DESCRIPTION

The **BUS\_CHILD\_DETACHED**() method is invoked by the new-bus framework after a device is detached or if a driver's attach routine (see [DEVICE\_ATTACH(9)](/DEVICE_ATTACH/9.md)) fails. A bus driver can provide an implementation of this method to reclaim any resources allocated on behalf of the child or to cleanup state not properly released by a [DEVICE\_DETACH(9)](/DEVICE_DETACH/9.md) method.

## SEE ALSO

[device(9)](/device/9.md), [DEVICE\_DETACH(9)](/DEVICE_DETACH/9.md)
