mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
Kernel: Use PCIDeviceIdentifier is_msi_capable() to retrieve MSI status
Instead of iterating through the capabilities, use the is_msi_capable() API from the PCIDeviceIdentifier class that belongs to the device.
This commit is contained in:
parent
09b5cefd43
commit
1bc2c5c110
1 changed files with 1 additions and 3 deletions
|
@ -23,9 +23,7 @@ Device::Device(DeviceIdentifier const& pci_identifier)
|
||||||
|
|
||||||
bool Device::is_msi_capable() const
|
bool Device::is_msi_capable() const
|
||||||
{
|
{
|
||||||
return AK::any_of(
|
return m_pci_identifier->is_msi_capable();
|
||||||
m_pci_identifier->capabilities(),
|
|
||||||
[](auto const& capability) { return capability.id().value() == PCI::Capabilities::ID::MSI; });
|
|
||||||
}
|
}
|
||||||
bool Device::is_msix_capable() const
|
bool Device::is_msix_capable() const
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue