mirror of
https://github.com/torvalds/linux.git
synced 2026-09-14 16:10:02 +02:00
Add a type Data<'bound> associated type to all bus driver traits, decoupling the driver's bus device private data type from the driver struct itself. In the context of adding a 'bound lifetime, making this an associated type has the advantage that it allows us to avoid a driver trait global lifetime and it avoids the need for ForLt for bus device private data; both of which make the subsequent implementation by buses much simpler. All existing drivers and doc examples set type Data = Self to preserve the current behavior. Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Reviewed-by: Gary Guo <gary@garyguo.net> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://patch.msgid.link/20260525202921.124698-5-dakr@kernel.org Signed-off-by: Danilo Krummrich <dakr@kernel.org> |
||
|---|---|---|
| .. | ||
| hostprogs | ||
| Kconfig | ||
| Makefile | ||
| rust_configfs.rs | ||
| rust_debugfs_scoped.rs | ||
| rust_debugfs.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 | ||