From 7d241968ff4feb83bc23636df3a7ddb80f4bb4a9 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Fri, 24 Jul 2026 00:55:57 +0200 Subject: kapi/device: remove init() --- kapi/kapi/boot_module/bus.hpp | 2 -- kapi/kapi/devices/bus.hpp | 14 -------------- kapi/kapi/devices/device.hpp | 6 ------ 3 files changed, 22 deletions(-) (limited to 'kapi') diff --git a/kapi/kapi/boot_module/bus.hpp b/kapi/kapi/boot_module/bus.hpp index e569b253..4d195111 100644 --- a/kapi/kapi/boot_module/bus.hpp +++ b/kapi/kapi/boot_module/bus.hpp @@ -38,8 +38,6 @@ namespace kapi::boot_modules { boot_module_device(std::size_t index, boot_module const & module); - auto init() -> bool override; - auto command_line() const -> std::string_view override; auto module() const -> boot_module const & override; diff --git a/kapi/kapi/devices/bus.hpp b/kapi/kapi/devices/bus.hpp index 10b9c39d..af9f2c33 100644 --- a/kapi/kapi/devices/bus.hpp +++ b/kapi/kapi/devices/bus.hpp @@ -10,7 +10,6 @@ #include #include -#include #include namespace kapi::devices @@ -27,11 +26,6 @@ namespace kapi::devices //! @param name The name of the bus. explicit bus(kstd::string const & name); - //! Initialize the bus and all of its children. - //! - //! @return true iff. the bus and all of its children are healthy, false otherwise. - auto init() -> bool final; - //! Attach a child device to this bus. //! //! Whenever a device is attached to a bus, the bus takes sole ownership of the device. @@ -46,16 +40,8 @@ namespace kapi::devices //! @return this bus's protocol facet if it has one, nullptr otherwise. [[nodiscard]] virtual auto protocol() -> struct bus_protocol *; - protected: - //! Enumerate the devices on the bus. - //! - //! @return true iff. the bus hardware is healthy, false otherwise. - auto virtual enumerate_old() -> bool; - private: kstd::vector> m_devices; - std::atomic_flag m_init_was_called{}; - std::atomic_flag m_initialized{}; }; //! @} diff --git a/kapi/kapi/devices/device.hpp b/kapi/kapi/devices/device.hpp index c1b2065b..70c5bd15 100644 --- a/kapi/kapi/devices/device.hpp +++ b/kapi/kapi/devices/device.hpp @@ -39,12 +39,6 @@ namespace kapi::devices */ virtual ~device() = default; - /** - * @brief Initialize the device. - * @return true on success, false otherwise. - */ - virtual auto init() -> bool = 0; - template [[nodiscard]] constexpr auto as() -> InterfaceType * { -- cgit v1.2.3