Skip to content

Commit 8eb698f

Browse files
author
Danilo Krummrich
committed
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 <daniel.almeida@collabora.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20250716150354.51081-4-dakr@kernel.org Signed-off-by: Danilo Krummrich <dakr@kernel.org>
1 parent 101d668 commit 8eb698f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

rust/kernel/pci.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,8 @@ impl Device<device::Core> {
449449
kernel::impl_device_context_deref!(unsafe { Device });
450450
kernel::impl_device_context_into_aref!(Device);
451451

452+
impl crate::dma::Device for Device<device::Core> {}
453+
452454
// SAFETY: Instances of `Device` are always reference-counted.
453455
unsafe impl crate::types::AlwaysRefCounted for Device {
454456
fn inc_ref(&self) {

0 commit comments

Comments
 (0)