mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
Kernel: Clarify and make it easy to not use raw numbers
Let's put the PCI IDs as enums in the PCI namespace so they're free to pollute that namespace, but it's also more easier to use them.
This commit is contained in:
parent
b4e230a7bb
commit
3fae7ca113
Notes:
sideshowbarker
2024-07-18 11:03:45 +09:00
Author: https://github.com/supercomputer7
Commit: 3fae7ca113
Pull-request: https://github.com/SerenityOS/serenity/pull/8399
Reviewed-by: https://github.com/alimpfard ✅
9 changed files with 25 additions and 21 deletions
|
@ -183,7 +183,7 @@ static bool is_valid_device_id(u16 device_id)
|
|||
UNMAP_AFTER_INIT RefPtr<E1000ENetworkAdapter> E1000ENetworkAdapter::try_to_initialize(PCI::Address address)
|
||||
{
|
||||
auto id = PCI::get_id(address);
|
||||
if (id.vendor_id != (u16)PCIVendorID::Intel)
|
||||
if (id.vendor_id != PCI::VendorID::Intel)
|
||||
return {};
|
||||
if (!is_valid_device_id(id.device_id))
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue