diff options
author | jhb <jhb@FreeBSD.org> | 2012-08-21 18:13:09 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2012-08-21 18:13:09 +0000 |
commit | 269886302961304d916ade24d529ed290aa81ce0 (patch) | |
tree | d390effd8181f2448a92c543db06edde2bac9ed6 /sys/kern/bus_if.m | |
parent | 7a7bbaad5a88b5ee15bae1e36c3ff798c6c4b3f2 (diff) | |
download | FreeBSD-src-269886302961304d916ade24d529ed290aa81ce0.zip FreeBSD-src-269886302961304d916ade24d529ed290aa81ce0.tar.gz |
Add a BUS_CHILD_DELETED() method that a bus can hook to allow it to cleanup
any bus-specific state (such as ivars) when a child device is deleted.
Requested by: kan
MFC after: 1 month
Diffstat (limited to 'sys/kern/bus_if.m')
-rw-r--r-- | sys/kern/bus_if.m | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/kern/bus_if.m b/sys/kern/bus_if.m index 96fbda8..b0ad611 100644 --- a/sys/kern/bus_if.m +++ b/sys/kern/bus_if.m @@ -160,6 +160,20 @@ METHOD int write_ivar { }; /** + * @brief Notify a bus that a child was deleted + * + * Called at the beginning of device_delete_child() to allow the parent + * to teardown any bus-specific state for the child. + * + * @param _dev the device whose child is being deleted + * @param _child the child device which is being deleted + */ +METHOD void child_deleted { + device_t _dev; + device_t _child; +}; + +/** * @brief Notify a bus that a child was detached * * Called after the child's DEVICE_DETACH() method to allow the parent |