Re: [PATCH v4 23/27] samples: rust: rust_driver_auxiliary: showcase lifetime-bound registration data
From: Alexandre Courbot
Date: Mon May 25 2026 - 10:49:21 EST
On Fri May 22, 2026 at 8:34 AM JST, 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().
>
> Reviewed-by: Eliot Courtney <ecourtney@xxxxxxxxxx>
> Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>
> Signed-off-by: Danilo Krummrich <dakr@xxxxxxxxxx>
Reviewed-by: Alexandre Courbot <acourbot@xxxxxxxxxx>