mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
Kernel/PCI: Make SATAProgIF comparable with ProgrammingInterface
This makes checking it a bit nicer
This commit is contained in:
parent
d64d03e0d6
commit
cfba182b61
Notes:
sideshowbarker
2024-07-16 22:16:50 +09:00
Author: https://github.com/Hendiadyoin1 Commit: https://github.com/SerenityOS/serenity/commit/cfba182b61 Pull-request: https://github.com/SerenityOS/serenity/pull/21028 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/supercomputer7 ✅
2 changed files with 2 additions and 1 deletions
|
@ -355,6 +355,7 @@ AK_MAKE_DISTINCT_NUMERIC_COMPARABLE_TO_ENUM(SubclassCode, Base::SubclassID);
|
|||
AK_MAKE_DISTINCT_NUMERIC_COMPARABLE_TO_ENUM(SubclassCode, SerialBus::SubclassID);
|
||||
|
||||
AK_TYPEDEF_DISTINCT_ORDERED_ID(u8, ProgrammingInterface);
|
||||
AK_MAKE_DISTINCT_NUMERIC_COMPARABLE_TO_ENUM(ProgrammingInterface, MassStorage::SATAProgIF);
|
||||
AK_MAKE_DISTINCT_NUMERIC_COMPARABLE_TO_ENUM(ProgrammingInterface, SerialBus::USBProgIf);
|
||||
|
||||
AK_TYPEDEF_DISTINCT_ORDERED_ID(u8, RevisionID);
|
||||
|
|
|
@ -120,7 +120,7 @@ UNMAP_AFTER_INIT void StorageManagement::enumerate_pci_controllers(bool force_pi
|
|||
#endif
|
||||
|
||||
if (subclass_code == SubclassID::SATAController
|
||||
&& device_identifier.prog_if().value() == to_underlying(PCI::MassStorage::SATAProgIF::AHCI)) {
|
||||
&& device_identifier.prog_if() == PCI::MassStorage::SATAProgIF::AHCI) {
|
||||
if (auto ahci_controller_or_error = AHCIController::initialize(device_identifier); !ahci_controller_or_error.is_error())
|
||||
m_controllers.append(ahci_controller_or_error.value());
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue