Lines Matching defs:pci_dev
101 pdev: *mut bindings::pci_dev,
105 // `struct pci_dev`.
123 extern "C" fn remove_callback(pdev: *mut bindings::pci_dev) {
125 // `struct pci_dev`.
336 /// This structure represents the Rust abstraction for a C `struct pci_dev`. The implementation
337 /// abstracts the usage of an already existing C `struct pci_dev` within Rust code that we get
342 /// A [`Device`] instance represents a valid `struct pci_dev` created by the C portion of the
346 Opaque<bindings::pci_dev>,
352 fn as_raw(&self) -> *mut bindings::pci_dev {
378 // SAFETY: `self.as_raw` is a valid pointer to a `struct pci_dev`.
387 // `struct pci_dev`.
395 // `struct pci_dev`.
403 // `struct pci_dev`.
411 // `struct pci_dev`.
419 // `struct pci_dev`.
431 // - by its type invariant `self.as_raw` is always a valid pointer to a `struct pci_dev`.
443 // - by its type invariant `self.as_raw` is always a valid pointer to a `struct pci_dev`.
450 // SAFETY: `self.as_raw` is a valid pointer to a `struct pci_dev`.
458 // SAFETY: `self.as_raw` is guaranteed to be a pointer to a valid `struct pci_dev`.
465 // SAFETY: `self.as_raw` is guaranteed to be a pointer to a valid `struct pci_dev`.
470 // SAFETY: `pci::Device` is a transparent wrapper of `struct pci_dev`.
473 const OFFSET: usize = offset_of!(bindings::pci_dev, dev);
499 // `struct pci_dev`.
518 // hence `dev` must be embedded in a valid `struct pci_dev` as guaranteed by the
520 let pdev = unsafe { container_of!(dev.as_raw(), bindings::pci_dev, dev) };
522 // SAFETY: `pdev` is a valid pointer to a `struct pci_dev`.
534 // SAFETY: Same as `Device<Normal>` -- the underlying `struct pci_dev` is the same;