mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 11:47:35 +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:
parent
da0a1068e9
commit
86ccacf6b5
3 changed files with 0 additions and 29 deletions
|
@ -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()
|
KResult UHCIController::reset()
|
||||||
{
|
{
|
||||||
if (auto stop_result = stop(); stop_result.is_error())
|
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 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&);
|
void get_port_status(Badge<UHCIRootHub>, u8, HubStatus&);
|
||||||
KResult set_port_feature(Badge<UHCIRootHub>, u8, HubFeatureSelector);
|
KResult set_port_feature(Badge<UHCIRootHub>, u8, HubFeatureSelector);
|
||||||
KResult clear_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.
|
// Bitfield containing whether a given port should signal a change in suspend or not.
|
||||||
u8 m_port_suspend_change_statuses { 0 };
|
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 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();
|
u8 allocate_address();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue