summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@kernel.org>2026-05-25 23:21:11 +0300
committerDanilo Krummrich <dakr@kernel.org>2026-05-27 17:29:34 +0300
commitd18f3646184fc805d213fc049fc3b5d9fb9a6a27 (patch)
tree55ccc1b6409451e325a92193a9b4fcf95f40d62e /include/linux
parent4555291ddae9abe2c40a7eae192b1976b07a1fad (diff)
downloadlinux-d18f3646184fc805d213fc049fc3b5d9fb9a6a27.tar.xz
samples: rust: rust_driver_auxiliary: showcase lifetime-bound registration data
Make the Data struct lifetime-parameterized, storing a reference to the parent pci::Device<Bound>. This demonstrates that registration data can hold device resources tied to the parent driver's lifetime. In connect(), retrieve the parent PCI device from the registration data rather than casting through adev.parent(). Reviewed-by: Eliot Courtney <ecourtney@nvidia.com> Reviewed-by: Gary Guo <gary@garyguo.net> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Link: https://patch.msgid.link/20260525202921.124698-25-dakr@kernel.org Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions