mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +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:
@@ -160,7 +160,7 @@ UNMAP_AFTER_INIT static bool is_valid_device_id(u16 device_id)
|
||||
UNMAP_AFTER_INIT RefPtr<E1000NetworkAdapter> E1000NetworkAdapter::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 {};
|
||||
|
||||
Reference in New Issue
Block a user