mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-08 18:57:22 +00:00
Extend the auxiliary driver sample to demonstrate both access patterns:
- registration_data() with CovariantForLt!(Data<'_>) for the covariant
data type that holds a plain &'bound reference.
- registration_data_with() with ForLt!(MutexData<'_>) for an invariant
data type that wraps a Mutex<&'bound Device>. Since Mutex<T> is
invariant over T, MutexData cannot implement CovariantForLt and must
use the closure-based accessor.
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Link: https://patch.msgid.link/20260626183630.2585057-5-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
|
History
|
|
|---|---|---|
| .. | ||
| hostprogs | ||
| Kconfig | ||
| Makefile | ||
| rust_configfs.rs | ||
| rust_debugfs.rs | ||
| rust_debugfs_scoped.rs | ||
| rust_dma.rs | ||
| rust_driver_auxiliary.rs | ||
| rust_driver_faux.rs | ||
| rust_driver_i2c.rs | ||
| rust_driver_pci.rs | ||
| rust_driver_platform.rs | ||
| rust_driver_usb.rs | ||
| rust_i2c_client.rs | ||
| rust_minimal.rs | ||
| rust_misc_device.rs | ||
| rust_print_events.c | ||
| rust_print_main.rs | ||
| rust_soc.rs | ||