summaryrefslogtreecommitdiff
path: root/rust/kernel/platform.rs
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@kernel.org>2025-07-16 17:02:49 +0200
committerDanilo Krummrich <dakr@kernel.org>2025-07-19 19:37:17 +0200
commit256de48f2cad85153b271b66320a9355773db64e (patch)
tree940b566cf23a236a94810295594c6d3bd5f7741f /rust/kernel/platform.rs
parent8eb698f54736b44a398ca883d0a33f661c12da9d (diff)
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>
Diffstat (limited to 'rust/kernel/platform.rs')
-rw-r--r--rust/kernel/platform.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/rust/kernel/platform.rs b/rust/kernel/platform.rs
index 3d7a532550c8..3c0c507c2432 100644
--- a/rust/kernel/platform.rs
+++ b/rust/kernel/platform.rs
@@ -231,6 +231,8 @@ impl<Ctx: device::DeviceContext> Device<Ctx> {
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) {