mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-05 00:56:39 +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:
parent
a411a44fda
commit
9d9d57056e
Notes:
sideshowbarker
2024-07-18 03:21:06 +09:00
Author: https://github.com/supercomputer7
Commit: 9d9d57056e
Pull-request: https://github.com/SerenityOS/serenity/pull/10187
Reviewed-by: https://github.com/awesomekling
13 changed files with 27 additions and 30 deletions
|
@ -27,7 +27,7 @@ UNMAP_AFTER_INIT void USBManagement::enumerate_controllers()
|
|||
if (kernel_command_line().disable_usb())
|
||||
return;
|
||||
|
||||
PCI::enumerate([this](PCI::Address const& address, PCI::DeviceIdentifier const& device_identifier) {
|
||||
PCI::enumerate([this](PCI::DeviceIdentifier const& device_identifier) {
|
||||
if (!(device_identifier.class_code().value() == 0xc && device_identifier.subclass_code().value() == 0x3))
|
||||
return;
|
||||
if (device_identifier.prog_if().value() == 0x0) {
|
||||
|
@ -41,21 +41,21 @@ UNMAP_AFTER_INIT void USBManagement::enumerate_controllers()
|
|||
}
|
||||
|
||||
if (device_identifier.prog_if().value() == 0x10) {
|
||||
dmesgln("USBManagement: OHCI controller found at {} is not currently supported.", address);
|
||||
dmesgln("USBManagement: OHCI controller found at {} is not currently supported.", device_identifier.address());
|
||||
return;
|
||||
}
|
||||
|
||||
if (device_identifier.prog_if().value() == 0x20) {
|
||||
dmesgln("USBManagement: EHCI controller found at {} is not currently supported.", address);
|
||||
dmesgln("USBManagement: EHCI controller found at {} is not currently supported.", device_identifier.address());
|
||||
return;
|
||||
}
|
||||
|
||||
if (device_identifier.prog_if().value() == 0x30) {
|
||||
dmesgln("USBManagement: xHCI controller found at {} is not currently supported.", address);
|
||||
dmesgln("USBManagement: xHCI controller found at {} is not currently supported.", device_identifier.address());
|
||||
return;
|
||||
}
|
||||
|
||||
dmesgln("USBManagement: Unknown/unsupported controller at {} with programming interface 0x{:02x}", address, device_identifier.prog_if().value());
|
||||
dmesgln("USBManagement: Unknown/unsupported controller at {} with programming interface 0x{:02x}", device_identifier.address(), device_identifier.prog_if().value());
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue