---
name: "bus_generic_detach"
section: "9"
platform: "linux"
package: "freebsd-manpages"
version: "6.0-5"
release: "Debian 4.0 (Etch)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/bus_generic_detach"
---

# bus\_generic\_detach(9)

generic implementation of DEVICE\_DETACH for busses

## NAME

**bus\_generic\_detach** – generic implementation of DEVICE\_DETACH for busses

## SYNOPSIS

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

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

*int*\

**bus\_generic\_detach**(*device\_t dev*);

## DESCRIPTION

This function provides an implementation of the [DEVICE\_DETACH(9)](/DEVICE_DETACH/9.md) method which can be used by most bus code. It simply calls the [DEVICE\_DETACH(9)](/DEVICE_DETACH/9.md) method of each child device attached to the bus.

## RETURN VALUES

Zero is returned on success, otherwise an appropriate error is returned.

## SEE ALSO

[device(9)](/device/9.md), [driver(9)](/driver/9.md)

## AUTHORS

This manual page was written by Doug Rabson.
