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.
This commit is contained in:
Pankaj Raghav
2023-04-29 19:23:14 +02:00
committed by Jelle Raaijmakers
parent d0fbaf790a
commit d3bb63afff

View File

@@ -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