Skip to content

Commit 256de48

Browse files
author
Danilo Krummrich
committed
rust: platform: implement the dma::Device trait
The platform bus is potentially capable of performing DMA, hence implement the `dma:Device` trait for `platform::Device`. Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20250716150354.51081-5-dakr@kernel.org Signed-off-by: Danilo Krummrich <dakr@kernel.org>
1 parent 8eb698f commit 256de48

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

rust/kernel/platform.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,8 @@ impl<Ctx: device::DeviceContext> Device<Ctx> {
231231
kernel::impl_device_context_deref!(unsafe { Device });
232232
kernel::impl_device_context_into_aref!(Device);
233233

234+
impl crate::dma::Device for Device<device::Core> {}
235+
234236
// SAFETY: Instances of `Device` are always reference-counted.
235237
unsafe impl crate::types::AlwaysRefCounted for Device {
236238
fn inc_ref(&self) {

0 commit comments

Comments
 (0)