Kernel: Use PCI:Class:ID::Bridge instead of magic value

This commit is contained in:
Idan Horowitz 2024-04-22 12:19:13 +03:00 committed by Andreas Kling
parent 519be6e626
commit e350d3b2c6

View file

@ -121,7 +121,7 @@ UNMAP_AFTER_INIT void HostController::enumerate_attached_devices(Function<Iterat
for (int bus_as_function_number = 1; bus_as_function_number < 8; ++bus_as_function_number) {
if (read16_field(0, 0, bus_as_function_number, PCI::RegisterOffset::VENDOR_ID) == PCI::none_value)
continue;
if (read8_field(0, 0, bus_as_function_number, PCI::RegisterOffset::CLASS) != 0x6)
if (read8_field(0, 0, bus_as_function_number, PCI::RegisterOffset::CLASS) != to_underlying(PCI::ClassID::Bridge))
continue;
if (Checked<u8>::addition_would_overflow(m_domain.start_bus(), bus_as_function_number))
break;