aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/pci.c
diff options
context:
space:
mode:
authorDanilo Krummrich <[email protected]>2024-12-19 17:04:10 +0000
committerGreg Kroah-Hartman <[email protected]>2024-12-20 16:19:26 +0000
commit76c01ded724bfb464878e22c89f7ecce26f5d50e (patch)
tree6a73c13383a46c72c007f9ee5c70e08010d9f438 /rust/helpers/pci.c
parentrust: add `io::{Io, IoRaw}` base types (diff)
downloadkernel-76c01ded724bfb464878e22c89f7ecce26f5d50e.tar.gz
kernel-76c01ded724bfb464878e22c89f7ecce26f5d50e.zip
rust: add devres abstraction
Add a Rust abstraction for the kernel's devres (device resource management) implementation. The Devres type acts as a container to manage the lifetime and accessibility of device bound resources. Therefore it registers a devres callback and revokes access to the resource on invocation. Users of the Devres abstraction can simply free the corresponding resources in their Drop implementation, which is invoked when either the Devres instance goes out of scope or the devres callback leads to the resource being revoked, which implies a call to drop_in_place(). Signed-off-by: Danilo Krummrich <[email protected]> Tested-by: Dirk Behme <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'rust/helpers/pci.c')
0 files changed, 0 insertions, 0 deletions