]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
rust: pci: fix documentation related to Device instances
authorRahul Rameshbabu <sergeantsagara@protonmail.com>
Sun, 6 Jul 2025 04:00:32 +0000 (04:00 +0000)
committerDanilo Krummrich <dakr@kernel.org>
Mon, 7 Jul 2025 12:32:09 +0000 (14:32 +0200)
Device instances in the pci crate represent a valid struct pci_dev, not a
struct device.

Fixes: 7b948a2af6b5 ("rust: pci: fix unrestricted &mut pci::Device")
Signed-off-by: Rahul Rameshbabu <sergeantsagara@protonmail.com>
Link: https://lore.kernel.org/r/20250706035944.18442-3-sergeantsagara@protonmail.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
rust/kernel/pci.rs

index 9afe2a8ed637238ea01163e9ba0ef38f1aa742f9..a1febfbfc7d77dd0b677dccd7683d599ba87c9f4 100644 (file)
@@ -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>,