diff options
| author | Danilo Krummrich <dakr@kernel.org> | 2026-05-05 18:23:08 +0300 |
|---|---|---|
| committer | Danilo Krummrich <dakr@kernel.org> | 2026-05-11 16:26:12 +0300 |
| commit | fd3b87ff0232f46e1ad53a48609a3853c8757c6c (patch) | |
| tree | b808a8a7b0ef53891648e5ac0fef90b3db75d436 /include/linux/workqueue_api.h | |
| parent | abb21500e7e5dcf2d1b1a4a02b2ee77b3d5061b6 (diff) | |
| download | linux-fd3b87ff0232f46e1ad53a48609a3853c8757c6c.tar.xz | |
rust: auxiliary: add registration data to auxiliary devices
Add a registration_data pointer to struct auxiliary_device, allowing the
registering (parent) driver to attach private data to the device at
registration time and retrieve it later when called back by the
auxiliary (child) driver.
By tying the data to the device's registration, Rust drivers can bind
the lifetime of device resources to it, since the auxiliary bus
guarantees that the parent driver remains bound while the auxiliary
device is bound.
On the Rust side, Registration<T> takes ownership of the data via
ForeignOwnable. A TypeId is stored alongside the data for runtime type
checking, making Device::registration_data<T>() a safe method.
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20260505152400.3905096-3-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'include/linux/workqueue_api.h')
0 files changed, 0 insertions, 0 deletions
