mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-21 09:49:21 +00:00
Kernel/SysFS: Adapt USB plug code to work with SysFS patterns
This commit is contained in:
parent
70afa0b171
commit
cdab213750
Notes:
sideshowbarker
2024-07-17 08:56:01 +09:00
Author: https://github.com/supercomputer7
Commit: cdab213750
Pull-request: https://github.com/SerenityOS/serenity/pull/13779
6 changed files with 36 additions and 47 deletions
|
@ -6,7 +6,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Badge.h>
|
||||
#include <Kernel/Bus/USB/USBDevice.h>
|
||||
#include <Kernel/Bus/USB/USBHub.h>
|
||||
#include <Kernel/FileSystem/SysFS/Component.h>
|
||||
#include <Kernel/FileSystem/SysFS/Subsystems/Bus/USB/DeviceInformation.h>
|
||||
#include <Kernel/Locking/Spinlock.h>
|
||||
|
@ -20,15 +22,11 @@ public:
|
|||
|
||||
virtual StringView name() const override { return "usb"sv; }
|
||||
|
||||
void plug(USB::Device&);
|
||||
void unplug(USB::Device&);
|
||||
void plug(Badge<USB::Hub>, SysFSUSBDeviceInformation&);
|
||||
void unplug(Badge<USB::Hub>, SysFSUSBDeviceInformation&);
|
||||
|
||||
private:
|
||||
explicit SysFSUSBBusDirectory(SysFSBusDirectory&);
|
||||
|
||||
RefPtr<SysFSUSBDeviceInformation> device_node_for(USB::Device& device);
|
||||
|
||||
IntrusiveList<&SysFSUSBDeviceInformation::m_list_node> m_device_nodes;
|
||||
mutable Spinlock m_lock;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue