mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
Kernel: Move SysFS USB create function
This commit is contained in:
committed by
Brian Gianforcaro
parent
4b1537387f
commit
b8cfec7b1f
@@ -45,10 +45,4 @@ UNMAP_AFTER_INIT void SysFSUSBBusDirectory::initialize()
|
||||
s_sysfs_usb_bus_directory = directory;
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user