Re: [PATCH v3 18/27] samples: rust: rust_driver_auxiliary: showcase lifetime-bound registration data

From: Gary Guo

Date: Tue May 19 2026 - 11:49:34 EST


On Sun May 17, 2026 at 1:01 AM BST, Danilo Krummrich wrote:
> 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().
>
> Signed-off-by: Danilo Krummrich <dakr@xxxxxxxxxx>

Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>

> ---
> samples/rust/rust_driver_auxiliary.rs | 27 ++++++++++++++++-----------
> 1 file changed, 16 insertions(+), 11 deletions(-)