diff options
| author | Danilo Krummrich <dakr@kernel.org> | 2026-05-25 23:21:03 +0300 |
|---|---|---|
| committer | Danilo Krummrich <dakr@kernel.org> | 2026-05-27 17:24:10 +0300 |
| commit | 71e6b6a80b5158323be56e0a776e9fa3cc77d061 (patch) | |
| tree | f95ec493a95afe0e28007b7af0b0383850d4e19f /include/linux/console_struct.h | |
| parent | a3f09f8e47c4262510c979b384d6f85d376d91f5 (diff) | |
| download | linux-71e6b6a80b5158323be56e0a776e9fa3cc77d061.tar.xz | |
rust: i2c: make Driver trait lifetime-parameterized
Add a 'bound lifetime to the associated Data, changing type Data to type
Data<'bound>.
This allows the driver's bus device private data to capture the device /
driver bound lifetime; device resources can be stored directly by
reference rather than requiring Devres.
The probe() and unbind() callbacks thus gain a 'bound lifetime parameter
on the methods themselves; avoiding a global lifetime on the trait impl.
Existing drivers set type Data<'bound> = Self, preserving the current
behavior.
Acked-by: Igor Korotin <igor.korotin@linux.dev>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260525202921.124698-17-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'include/linux/console_struct.h')
0 files changed, 0 insertions, 0 deletions
