diff options
Diffstat (limited to 'samples/rust')
-rw-r--r-- | samples/rust/rust_pci_driver/driver.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/samples/rust/rust_pci_driver/driver.rs b/samples/rust/rust_pci_driver/driver.rs index 64a3189d8689..7bd5c36228ae 100644 --- a/samples/rust/rust_pci_driver/driver.rs +++ b/samples/rust/rust_pci_driver/driver.rs @@ -10,12 +10,14 @@ pub(crate) struct Driver; impl pci::Driver for Driver { define_pci_id_table! { + (), [ (pci::DeviceId::new(bindings::PCI_VENDOR_ID_REDHAT, - PCI_DEVICE_ID_REDHAT_QEMU_PCI_TESTDEV)) ] + PCI_DEVICE_ID_REDHAT_QEMU_PCI_TESTDEV), None) ] } - fn probe(_pdev: *mut bindings::pci_dev) -> Result { + fn probe(_pdev: *mut bindings::pci_dev, id: Option<&Self::IdInfo>) -> Result { pr_info!("Probe Rust PCI driver sample.\n"); + pr_info!("Info: {:?}\n", id); Ok(()) } |