]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust: pci: add DeviceId::from_class_and_vendor() method
authorJohn Hubbard <jhubbard@nvidia.com>
Fri, 29 Aug 2025 22:36:29 +0000 (15:36 -0700)
committerDanilo Krummrich <dakr@kernel.org>
Mon, 1 Sep 2025 18:09:55 +0000 (20:09 +0200)
commitdd3933e9b572aed775fd632ed6124aa67457de72
treea7b067a24110091f1f5b89db83bae8e330b0dd2a
parent5e20962a9fc8a0b5b91f0989d3baf03f02bc99cb
rust: pci: add DeviceId::from_class_and_vendor() method

Add a new method to create PCI DeviceIds that match both a specific
vendor and PCI class. This is more targeted than the existing
from_class() method as it filters on both vendor and class criteria.

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-4-jhubbard@nvidia.com
[ Minor doc-comment improvements. - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
rust/kernel/pci.rs