1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:07:35 +00:00

Kernel: Use TRY() some more in USB::Hub

This commit is contained in:
Andreas Kling 2021-09-05 21:37:06 +02:00
parent 8ceff65161
commit 4d961387c1
2 changed files with 11 additions and 15 deletions

View file

@ -83,9 +83,6 @@ public:
static KResultOr<NonnullRefPtr<Hub>> try_create_root_hub(NonnullRefPtr<USBController>, DeviceSpeed);
static KResultOr<NonnullRefPtr<Hub>> try_create_from_device(Device const&);
// Root Hub constructor
Hub(NonnullRefPtr<USBController>, DeviceSpeed, NonnullOwnPtr<Pipe> default_pipe);
Hub(Device const&, NonnullOwnPtr<Pipe> default_pipe);
virtual ~Hub() override = default;
KResult enumerate_and_power_on_hub();
@ -99,7 +96,12 @@ public:
void check_for_port_updates();
private:
USBHubDescriptor m_hub_descriptor;
// Root Hub constructor
Hub(NonnullRefPtr<USBController>, DeviceSpeed, NonnullOwnPtr<Pipe> default_pipe);
Hub(Device const&, NonnullOwnPtr<Pipe> default_pipe);
USBHubDescriptor m_hub_descriptor {};
Device::List m_children;