Lines Matching defs:DeviceId
75 // SAFETY: `DeviceId` is a `#[repr(transparent)]` wrapper of `struct pci_device_id` and
77 let id = unsafe { &*id.cast::<DeviceId>() };
129 pub struct DeviceId(bindings::pci_device_id);
131 impl DeviceId {
136 /// Create a new `pci::DeviceId` from a vendor and device ID.
142 subvendor: DeviceId::PCI_ANY_ID,
143 subdevice: DeviceId::PCI_ANY_ID,
153 /// Create a new `pci::DeviceId` from a class number and mask.
157 vendor: DeviceId::PCI_ANY_ID,
158 device: DeviceId::PCI_ANY_ID,
159 subvendor: DeviceId::PCI_ANY_ID,
160 subdevice: DeviceId::PCI_ANY_ID,
168 /// Create a new [`DeviceId`] from a class number, mask, and specific vendor.
170 /// This is more targeted than [`DeviceId::from_class`]: in addition to matching by [`Vendor`],
181 device: DeviceId::PCI_ANY_ID,
182 subvendor: DeviceId::PCI_ANY_ID,
183 subdevice: DeviceId::PCI_ANY_ID,
192 // SAFETY: `DeviceId` is a `#[repr(transparent)]` wrapper of `pci_device_id` and does not add
194 unsafe impl RawDeviceId for DeviceId {
199 unsafe impl RawDeviceIdIndex for DeviceId {
208 pub type IdTable<T> = &'static dyn kernel::device_id::IdTable<DeviceId, T>;
215 $crate::pci::DeviceId,
239 /// pci::DeviceId::from_id(pci::Vendor::REDHAT, bindings::PCI_ANY_ID as u32),