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

Kernel/USB: Remove get_device_{at_port,from_address}

Nothing was using these. These can be put back in the future if
required. This also allows removing the devices array in UHCI.
This commit is contained in:
Luke 2021-08-13 20:47:16 +01:00 committed by Andreas Kling
parent da0a1068e9
commit 86ccacf6b5
3 changed files with 0 additions and 29 deletions

View file

@ -254,27 +254,6 @@ UNMAP_AFTER_INIT UHCIController::~UHCIController()
{
}
RefPtr<USB::Device> const UHCIController::get_device_at_port(USB::Device::PortNumber port)
{
if (!m_devices.at(to_underlying(port)))
return nullptr;
return m_devices.at(to_underlying(port));
}
RefPtr<USB::Device> const UHCIController::get_device_from_address(u8 device_address)
{
for (auto const& device : m_devices) {
if (!device)
continue;
if (device->address() == device_address)
return device;
}
return nullptr;
}
KResult UHCIController::reset()
{
if (auto stop_result = stop(); stop_result.is_error())