linux/samples/rust
John Hubbard 1b8ac37677 rust: pci: use pci::Vendor instead of bindings::PCI_VENDOR_ID_*
Change Device::vendor_id() to return a Vendor type, and change
DeviceId::from_id() to accept a Vendor type.

Use the new pci::Vendor in the various Rust for Linux callers who were
previously using bindings::PCI_VENDOR_ID_*.

Doing so also allows removing "use kernel::bindings" entirely from most
of the affected files here.

Also, mark vendor_id() as inline.

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-6-jhubbard@nvidia.com
[ Replace "as a validated vendor" with "as [`Vendor`]". - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
History 2025-09-01 20:16:36 +02:00
..
hostprogs samples: add first Rust examples 2022-09-28 09:03:08 +02:00
Kconfig drm for 6.16-rc1 2025-05-28 09:46:39 -07:00
Makefile drm for 6.16-rc1 2025-05-28 09:46:39 -07:00
rust_configfs.rs rust: macros: remove module!'s deprecated author key 2025-06-24 01:01:13 +02:00
rust_dma.rs rust: pci: use pci::Vendor instead of bindings::PCI_VENDOR_ID_* 2025-09-01 20:16:36 +02:00
rust_driver_auxiliary.rs rust: pci: use pci::Vendor instead of bindings::PCI_VENDOR_ID_* 2025-09-01 20:16:36 +02:00
rust_driver_faux.rs Driver core updates for 6.15-rc1 2025-04-01 11:02:03 -07:00
rust_driver_pci.rs rust: pci: use pci::Vendor instead of bindings::PCI_VENDOR_ID_* 2025-09-01 20:16:36 +02:00
rust_driver_platform.rs rust: driver-core: Update ARef and AlwaysRefCounted imports from sync::aref 2025-08-15 22:34:41 +02:00
rust_minimal.rs rust: module: introduce authors key 2025-03-10 15:12:17 +01:00
rust_misc_device.rs rust: uaccess: use newtype for user pointers 2025-07-14 23:52:45 +02:00
rust_print_events.c rust: samples: add tracepoint to Rust sample 2024-11-04 16:21:44 -05:00
rust_print_main.rs rust: use kernel::{fmt,prelude::fmt!} 2025-07-21 01:16:35 +02:00