aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/kapi
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-04-02 15:49:14 +0200
committerFelix Morgner <felix.morgner@ost.ch>2026-04-02 15:49:14 +0200
commit21489576381d827871e7cdf060929c5d7f3d4e9f (patch)
treea6be5285e475ba1e51eb78d312077c522aefd6e0 /arch/x86_64/kapi
parent33b43603936ed0108d67853727a17d6b3740b445 (diff)
downloadteachos-21489576381d827871e7cdf060929c5d7f3d4e9f.tar.xz
teachos-21489576381d827871e7cdf060929c5d7f3d4e9f.zip
devices: don't automatically allocate major numbers in ctors
Diffstat (limited to 'arch/x86_64/kapi')
-rw-r--r--arch/x86_64/kapi/devices.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86_64/kapi/devices.cpp b/arch/x86_64/kapi/devices.cpp
index 7aa7090..b15503d 100644
--- a/arch/x86_64/kapi/devices.cpp
+++ b/arch/x86_64/kapi/devices.cpp
@@ -21,9 +21,11 @@ namespace kapi::devices
{
kstd::println("[x86_64:devices] Initializing ISA bus...");
- auto isa_bus = kstd::make_unique<arch::bus::isa>();
+ auto isa_major_number = kapi::devices::allocate_major_number();
+ auto isa_bus = kstd::make_unique<arch::bus::isa>(isa_major_number);
- auto pit = kstd::make_unique<arch::devices::legacy_pit>(pit_frequency_in_hz);
+ auto pit_major_number = kapi::devices::allocate_major_number();
+ auto pit = kstd::make_unique<arch::devices::legacy_pit>(pit_major_number, pit_frequency_in_hz);
isa_bus->add_child(std::move(pit));
auto & root_bus = get_root_bus();