diff options
author | John Hubbard <jhubbard@nvidia.com> | 2025-08-29 15:36:28 -0700 |
---|---|---|
committer | Danilo Krummrich <dakr@kernel.org> | 2025-09-01 20:05:22 +0200 |
commit | 5e20962a9fc8a0b5b91f0989d3baf03f02bc99cb (patch) | |
tree | a263682c0a135a4d0ae72a416291861ed3cb6748 /rust/kernel/pci.rs | |
parent | ed78a01887e2257cff0412b640db68b70a2654dc (diff) |
rust: pci: provide access to PCI Vendor values
This allows callers to write Vendor::SOME_COMPANY instead of
bindings::PCI_VENDOR_ID_SOME_COMPANY.
New APIs:
Vendor::SOME_COMPANY
Vendor::from_raw() -- Only accessible from the pci (parent) module.
Vendor::as_raw()
Vendor: fmt::Display for Vendor
Cc: Danilo Krummrich <dakr@kernel.org>
Cc: Elle Rhumsaa <elle@weathered-steel.dev>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Link: https://lore.kernel.org/r/20250829223632.144030-3-jhubbard@nvidia.com
[ Minor doc-comment improvements, align Debug and Display. - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'rust/kernel/pci.rs')
-rw-r--r-- | rust/kernel/pci.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/kernel/pci.rs b/rust/kernel/pci.rs index 72d38f23f914..4f7ef82492ae 100644 --- a/rust/kernel/pci.rs +++ b/rust/kernel/pci.rs @@ -26,7 +26,7 @@ use kernel::prelude::*; mod id; -pub use self::id::{Class, ClassMask}; +pub use self::id::{Class, ClassMask, Vendor}; /// An adapter for the registration of PCI drivers. pub struct Adapter<T: Driver>(T); |