diff options
| author | Danilo Krummrich <dakr@kernel.org> | 2026-05-25 23:20:59 +0300 |
|---|---|---|
| committer | Danilo Krummrich <dakr@kernel.org> | 2026-05-27 17:23:10 +0300 |
| commit | 16c2b8fdab7c0808ff36430b2f49569029a8f484 (patch) | |
| tree | b0143f177293568ad25a43b73ca92bbbb7c178d6 /include/linux/stringify.h | |
| parent | 24799831d631239ff21ea1bf7feee832df48b81f (diff) | |
| download | linux-16c2b8fdab7c0808ff36430b2f49569029a8f484.tar.xz | |
rust: pci: 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.
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-13-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'include/linux/stringify.h')
0 files changed, 0 insertions, 0 deletions
