git: a6d562d415c2 - stable/14 - new-bus: Add a comment for bus_generic_get_domain
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 03 Jan 2024 22:02:42 UTC
The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a6d562d415c2f2bb26931d0cf79af2ca770be0da commit a6d562d415c2f2bb26931d0cf79af2ca770be0da Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2023-11-24 18:33:57 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2024-01-03 20:47:02 +0000 new-bus: Add a comment for bus_generic_get_domain (cherry picked from commit 00b3cde596dd3945d56aa12f2a4957b2910e1ee3) --- sys/kern/subr_bus.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 1a73df25ff34..571e90b52dfc 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -4201,6 +4201,13 @@ bus_generic_child_present(device_t dev, device_t child) return (BUS_CHILD_PRESENT(device_get_parent(dev), dev)); } +/** + * @brief Helper function for implementing BUS_GET_DOMAIN(). + * + * This simple implementation of BUS_GET_DOMAIN() calls the + * BUS_GET_DOMAIN() method of the parent of @p dev. If @p dev + * does not have a parent, the function fails with ENOENT. + */ int bus_generic_get_domain(device_t dev, device_t child, int *domain) {