Kernel/PCI: Remove all macros and replace them with enum classes

This commit is contained in:
Liav A 2021-09-28 20:18:51 +03:00 committed by Andreas Kling
commit ef9b8ff0c7
Notes: sideshowbarker 2024-07-18 03:21:02 +09:00
11 changed files with 206 additions and 146 deletions

View file

@ -18,7 +18,7 @@ Device::Device(Address address)
bool Device::is_msi_capable() const
{
for (const auto& capability : PCI::get_device_identifier(pci_address()).capabilities()) {
if (capability.id() == PCI_CAPABILITY_MSI)
if (capability.id().value() == PCI::Capabilities::ID::MSI)
return true;
}
return false;
@ -26,7 +26,7 @@ bool Device::is_msi_capable() const
bool Device::is_msix_capable() const
{
for (const auto& capability : PCI::get_device_identifier(pci_address()).capabilities()) {
if (capability.id() == PCI_CAPABILITY_MSIX)
if (capability.id().value() == PCI::Capabilities::ID::MSIX)
return true;
}
return false;