diff options
author | John Baldwin <jhb@FreeBSD.org> | 2012-08-21 18:13:09 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2012-08-21 18:13:09 +0000 |
commit | 6f7d0018b09fc2a0d328049f8a759e6318ca1b86 (patch) | |
tree | d390effd8181f2448a92c543db06edde2bac9ed6 /sys/kern/bus_if.m | |
parent | 06fd9875aa3a324b13f4dccc21f74f77b04bff56 (diff) | |
download | src-6f7d0018b09fc2a0d328049f8a759e6318ca1b86.tar.gz src-6f7d0018b09fc2a0d328049f8a759e6318ca1b86.zip |
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
Notes
Notes:
svn path=/head/; revision=239512
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 96fbda884618..b0ad6110c6f7 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 |