Commit 5cddd546 authored by Rahul Rameshbabu's avatar Rahul Rameshbabu Committed by Danilo Krummrich
Browse files

rust: pci: fix documentation related to Device instances



Device instances in the pci crate represent a valid struct pci_dev, not a
struct device.

Fixes: 7b948a2a ("rust: pci: fix unrestricted &mut pci::Device")
Signed-off-by: default avatarRahul Rameshbabu <sergeantsagara@protonmail.com>
Link: https://lore.kernel.org/r/20250706035944.18442-3-sergeantsagara@protonmail.com


Signed-off-by: default avatarDanilo Krummrich <dakr@kernel.org>
parent 6d16cd57
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -250,7 +250,8 @@ pub trait Driver: Send {
///
/// # Invariants
///
/// A [`Device`] instance represents a valid `struct device` created by the C portion of the kernel.
/// A [`Device`] instance represents a valid `struct pci_dev` created by the C portion of the
/// kernel.
#[repr(transparent)]
pub struct Device<Ctx: device::DeviceContext = device::Normal>(
    Opaque<bindings::pci_dev>,