summaryrefslogtreecommitdiff
path: root/Kernel/Devices/DeviceManagement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Devices/DeviceManagement.cpp')
-rw-r--r--Kernel/Devices/DeviceManagement.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Kernel/Devices/DeviceManagement.cpp b/Kernel/Devices/DeviceManagement.cpp
index 1b0bd26a45..5f68d1cfb4 100644
--- a/Kernel/Devices/DeviceManagement.cpp
+++ b/Kernel/Devices/DeviceManagement.cpp
@@ -42,10 +42,10 @@ DeviceManagement& DeviceManagement::the()
return *s_the;
}
-Device* DeviceManagement::get_device(unsigned major, unsigned minor)
+Device* DeviceManagement::get_device(MajorNumber major, MinorNumber minor)
{
return m_devices.with_exclusive([&](auto& map) -> Device* {
- auto it = map.find(encoded_device(major, minor));
+ auto it = map.find(encoded_device(major.value(), minor.value()));
if (it == map.end())
return nullptr;
return it->value;
@@ -54,7 +54,7 @@ Device* DeviceManagement::get_device(unsigned major, unsigned minor)
void DeviceManagement::before_device_removal(Badge<Device>, Device& device)
{
- u32 device_id = encoded_device(device.major(), device.minor());
+ u64 device_id = encoded_device(device.major(), device.minor());
m_devices.with_exclusive([&](auto& map) -> void {
VERIFY(map.contains(device_id));
map.remove(encoded_device(device.major(), device.minor()));
@@ -63,7 +63,7 @@ void DeviceManagement::before_device_removal(Badge<Device>, Device& device)
void DeviceManagement::after_inserting_device(Badge<Device>, Device& device)
{
- u32 device_id = encoded_device(device.major(), device.minor());
+ u64 device_id = encoded_device(device.major(), device.minor());
m_devices.with_exclusive([&](auto& map) -> void {
if (map.contains(device_id)) {
dbgln("Already registered {},{}: {}", device.major(), device.minor(), device.class_name());