Re: [PATCH 3/4] samples: rust_dma: separate driver type from driver data
From: Gary Guo
Date: Thu Sep 03 2026 - 09:26:48 EST
On Sun Aug 30, 2026 at 8:37 PM BST, Danilo Krummrich wrote:
> Split DmaSampleDriver into a driver type and a separate DmaSampleData
> struct for the driver's bus device private data, using
> DmaSampleData<'bound> as the Driver::Data<'bound> associated type.
>
> Store a &'bound pci::Device<Bound> reference instead of an
> ARef<pci::Device>, tying the data to the device's bound scope.
>
> This prepares for adding a lifetime parameter to dma::Coherent, which
> requires the data type to carry a lifetime.
>
> Signed-off-by: Danilo Krummrich <dakr@xxxxxxxxxx>
Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>
> ---
> samples/rust/rust_dma.rs | 26 +++++++++++++++-----------
> 1 file changed, 15 insertions(+), 11 deletions(-)