From: Danilo Krummrich Date: Wed, 16 Jul 2025 15:02:48 +0000 (+0200) Subject: rust: pci: implement the `dma::Device` trait X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8eb698f54736b44a398ca883d0a33f661c12da9d;p=thirdparty%2Fkernel%2Fstable.git rust: pci: implement the `dma::Device` trait The PCI bus is potentially capable of performing DMA, hence implement the `dma:Device` trait for `pci::Device`. Reviewed-by: Daniel Almeida Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20250716150354.51081-4-dakr@kernel.org Signed-off-by: Danilo Krummrich --- diff --git a/rust/kernel/pci.rs b/rust/kernel/pci.rs index 6a4854cf4bf9..44a2f3d2884a 100644 --- a/rust/kernel/pci.rs +++ b/rust/kernel/pci.rs @@ -449,6 +449,8 @@ impl Device { kernel::impl_device_context_deref!(unsafe { Device }); kernel::impl_device_context_into_aref!(Device); +impl crate::dma::Device for Device {} + // SAFETY: Instances of `Device` are always reference-counted. unsafe impl crate::types::AlwaysRefCounted for Device { fn inc_ref(&self) {