The platform bus is potentially capable of performing DMA, hence implement the `dma:Device` trait for `platform::Device`. Signed-off-by: Danilo Krummrich <dakr@xxxxxxxxxx> --- rust/kernel/platform.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rust/kernel/platform.rs b/rust/kernel/platform.rs index 5b21fa517e55..7236af6482be 100644 --- a/rust/kernel/platform.rs +++ b/rust/kernel/platform.rs @@ -195,6 +195,8 @@ fn as_raw(&self) -> *mut bindings::platform_device { kernel::impl_device_context_deref!(unsafe { Device }); kernel::impl_device_context_into_aref!(Device); +impl crate::dma::Device for Device<device::Core> {} + // SAFETY: Instances of `Device` are always reference-counted. unsafe impl crate::types::AlwaysRefCounted for Device { fn inc_ref(&self) { -- 2.50.0