mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:27:35 +00:00
Kernel: Make PCI [Sub]ClassCode comparable to the corresponding ID enums
This commit is contained in:
parent
3273ef1e3f
commit
66647b58d4
5 changed files with 15 additions and 8 deletions
|
@ -152,10 +152,10 @@ UNMAP_AFTER_INIT void StorageManagement::enumerate_pci_controllers(bool force_pi
|
|||
};
|
||||
|
||||
MUST(PCI::enumerate([&](PCI::DeviceIdentifier const& device_identifier) -> void {
|
||||
auto class_code = device_identifier.class_code().value();
|
||||
if (class_code == to_underlying(PCI::ClassID::MassStorage)) {
|
||||
auto class_code = device_identifier.class_code();
|
||||
if (class_code == PCI::ClassID::MassStorage) {
|
||||
handle_mass_storage_device(device_identifier);
|
||||
} else if (class_code == to_underlying(PCI::ClassID::Base)) {
|
||||
} else if (class_code == PCI::ClassID::Base) {
|
||||
handle_base_device(device_identifier);
|
||||
}
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue