From d3bb63afffd14af79b77349e79ded8cd6dc3c715 Mon Sep 17 00:00:00 2001 From: Pankaj Raghav Date: Sat, 29 Apr 2023 19:23:14 +0200 Subject: [PATCH] Kernel: Use PCIIdentifier is_msix_capable API to retrieve MSIx status Instead of iterating through the capabilities, use the is_msix_capable() API from the PCIIdentifier class that belongs to the device. --- Kernel/Bus/PCI/Device.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Kernel/Bus/PCI/Device.cpp b/Kernel/Bus/PCI/Device.cpp index 28761b2ca5..83805efd04 100644 --- a/Kernel/Bus/PCI/Device.cpp +++ b/Kernel/Bus/PCI/Device.cpp @@ -24,9 +24,7 @@ bool Device::is_msi_capable() const } bool Device::is_msix_capable() const { - return AK::any_of( - m_pci_identifier->capabilities(), - [](auto const& capability) { return capability.id().value() == PCI::Capabilities::ID::MSIX; }); + return m_pci_identifier->is_msix_capable(); } void Device::enable_pin_based_interrupts() const