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>
This commit is contained in:
@@ -449,6 +449,8 @@ impl Device<device::Core> {
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user