mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03: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:
parent
da0a1068e9
commit
86ccacf6b5
Notes:
sideshowbarker
2024-07-18 05:43:46 +09:00
Author: https://github.com/Lubrsi Commit: https://github.com/SerenityOS/serenity/commit/86ccacf6b52 Pull-request: https://github.com/SerenityOS/serenity/pull/9394 Reviewed-by: https://github.com/supercomputer7
@ -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())
|
||||
|
@ -42,9 +42,6 @@ public:
|
||||
|
||||
virtual KResultOr<size_t> submit_control_transfer(Transfer& transfer) override;
|
||||
|
||||
virtual RefPtr<USB::Device> const get_device_at_port(USB::Device::PortNumber) override;
|
||||
virtual RefPtr<USB::Device> const get_device_from_address(u8 device_address) override;
|
||||
|
||||
void get_port_status(Badge<UHCIRootHub>, u8, HubStatus&);
|
||||
KResult set_port_feature(Badge<UHCIRootHub>, u8, HubFeatureSelector);
|
||||
KResult clear_port_feature(Badge<UHCIRootHub>, u8, HubFeatureSelector);
|
||||
@ -109,8 +106,6 @@ private:
|
||||
|
||||
// Bitfield containing whether a given port should signal a change in suspend or not.
|
||||
u8 m_port_suspend_change_statuses { 0 };
|
||||
|
||||
Array<RefPtr<USB::Device>, NUMBER_OF_ROOT_PORTS> m_devices; // Devices connected to the root ports (of which there are two)
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -25,9 +25,6 @@ public:
|
||||
|
||||
virtual KResultOr<size_t> submit_control_transfer(Transfer&) = 0;
|
||||
|
||||
virtual RefPtr<USB::Device> const get_device_at_port(USB::Device::PortNumber) = 0;
|
||||
virtual RefPtr<USB::Device> const get_device_from_address(u8) = 0;
|
||||
|
||||
u8 allocate_address();
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user