Skip to content
Commit 0494d9c8 authored by Wedson Almeida Filho's avatar Wedson Almeida Filho Committed by Greg Kroah-Hartman
Browse files

rust: add `Revocable` type



Revocable allows access to objects to be safely revoked at run time.

This is useful, for example, for resources allocated during device probe;
when the device is removed, the driver should stop accessing the device
resources even if another state is kept in memory due to existing
references (i.e., device context data is ref-counted and has a non-zero
refcount after removal of the device).

Signed-off-by: default avatarWedson Almeida Filho <wedsonaf@gmail.com>
Co-developed-by: default avatarDanilo Krummrich <dakr@kernel.org>
Signed-off-by: default avatarDanilo Krummrich <dakr@kernel.org>
Tested-by: default avatarDirk Behme <dirk.behme@de.bosch.com>
Link: https://lore.kernel.org/r/20241219170425.12036-7-dakr@kernel.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2d3bf6ff
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment