1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:38:11 +00:00

Kernel/PCI: Remove Address from enumeration callback

If we need that address, we can always get it from the DeviceIdentifier.
This commit is contained in:
Liav A 2021-09-23 11:05:00 +03:00 committed by Andreas Kling
parent a411a44fda
commit 9d9d57056e
13 changed files with 27 additions and 30 deletions

View file

@ -614,12 +614,12 @@ private:
virtual KResult try_generate(KBufferBuilder& builder) override
{
JsonArraySerializer array { builder };
PCI::enumerate([&array](PCI::Address address, PCI::DeviceIdentifier const& device_identifier) {
PCI::enumerate([&array](PCI::DeviceIdentifier const& device_identifier) {
auto obj = array.add_object();
obj.add("domain", address.domain());
obj.add("bus", address.bus());
obj.add("device", address.device());
obj.add("function", address.function());
obj.add("domain", device_identifier.address().domain());
obj.add("bus", device_identifier.address().bus());
obj.add("device", device_identifier.address().device());
obj.add("function", device_identifier.address().function());
obj.add("vendor_id", device_identifier.hardware_id().vendor_id);
obj.add("device_id", device_identifier.hardware_id().device_id);
obj.add("revision_id", device_identifier.revision_id().value());