mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:28:12 +00:00
Kernel: Move SysFS USB create function
This commit is contained in:
parent
4b1537387f
commit
b8cfec7b1f
2 changed files with 6 additions and 6 deletions
|
@ -11,6 +11,12 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
ErrorOr<NonnullRefPtr<SysFSUSBDeviceInformation>> SysFSUSBDeviceInformation::create(USB::Device& device)
|
||||
{
|
||||
auto device_name = TRY(KString::number(device.address()));
|
||||
return adopt_nonnull_ref_or_enomem(new (nothrow) SysFSUSBDeviceInformation(move(device_name), device));
|
||||
}
|
||||
|
||||
SysFSUSBDeviceInformation::SysFSUSBDeviceInformation(NonnullOwnPtr<KString> device_name, USB::Device& device)
|
||||
: SysFSComponent()
|
||||
, m_device(device)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue