Re: [PATCH 2/2] rust: device: move drvdata_borrow() to InternalBoundContext
From: Markus Probst
Date: Sun Jun 28 2026 - 21:16:42 EST
On Sat, 2026-05-30 at 15:27 +0200, Danilo Krummrich wrote:
> Move drvdata_borrow() from impl Device<CoreInternal<'a>> to
> impl<Ctx: InternalBoundContext> Device<Ctx>, making it available from
> both CoreInternal and BoundInternal contexts.
>
> Fold drvdata_unchecked() (previously on Device<Bound>) directly into
> drvdata_borrow(), since it was only called from there and the generic
> context cannot resolve methods through the deref chain.
>
> Signed-off-by: Danilo Krummrich <dakr@xxxxxxxxxx>
> ---
> rust/kernel/device.rs | 18 ++----------------
> 1 file changed, 2 insertions(+), 16 deletions(-)
>
Reviewed-By: Markus Probst <markus.probst@xxxxxxxxx>
Thanks
- Markus Probst
Attachment:
signature.asc
Description: This is a digitally signed message part