aboutsummaryrefslogtreecommitdiff
path: root/kapi
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-07-21 17:33:13 +0200
committerFelix Morgner <felix.morgner@ost.ch>2026-07-21 17:33:13 +0200
commit93de74017095f86a6c62447938ec6169a5184c45 (patch)
treeff5087083a953e783ff43ea4b64944564b1d67ad /kapi
parent4539791823a2fb1506e9091ec5087c80a87adfde (diff)
downloadkernel-93de74017095f86a6c62447938ec6169a5184c45.tar.xz
kernel-93de74017095f86a6c62447938ec6169a5184c45.zip
kapi: remove major number allocator
Diffstat (limited to 'kapi')
-rw-r--r--kapi/gdb/devices/device.py4
-rw-r--r--kapi/kapi/devices/bus.hpp2
-rw-r--r--kapi/kapi/devices/device.hpp4
-rw-r--r--kapi/kapi/devices/manager.hpp6
4 files changed, 4 insertions, 12 deletions
diff --git a/kapi/gdb/devices/device.py b/kapi/gdb/devices/device.py
index 8e515ef8..58f6ea59 100644
--- a/kapi/gdb/devices/device.py
+++ b/kapi/gdb/devices/device.py
@@ -7,12 +7,10 @@ class KapiDevicesDevicePrinter(gdb.ValuePrinter):
def to_string(self):
return (
- f"{self.__val['m_name']} @ {self.__val['m_major']}:{self.__val['m_minor']}"
+ f"{self.__val['m_name']}"
)
def children(self):
- yield ("major", self.__val["m_major"])
- yield ("minor", self.__val["m_minor"])
yield ("name", self.__val["m_name"])
yield ("parent", self.__val["m_parent"])
diff --git a/kapi/kapi/devices/bus.hpp b/kapi/kapi/devices/bus.hpp
index 913149fb..1f433efc 100644
--- a/kapi/kapi/devices/bus.hpp
+++ b/kapi/kapi/devices/bus.hpp
@@ -21,7 +21,7 @@ namespace kapi::devices
//! A bus device that represents a logical/physical tree of devices and busses.
struct bus : device
{
- //! Construct a bus with the given major number, minor number, and name.
+ //! Construct a bus with the given name.
//!
//! @param name The name of the bus.
explicit bus(kstd::string const & name);
diff --git a/kapi/kapi/devices/device.hpp b/kapi/kapi/devices/device.hpp
index 34254002..d72a6bbd 100644
--- a/kapi/kapi/devices/device.hpp
+++ b/kapi/kapi/devices/device.hpp
@@ -15,12 +15,12 @@ namespace kapi::devices
//! @{
/**
- * @brief Base device identified by a major, minor number and name.
+ * @brief Base device identified by a name.
*/
struct device
{
/**
- * @brief Create a device identifier from @p major, @p minor and @p name.
+ * @brief Create a device identified by @p name.
* @param name Device name.
*/
explicit device(kstd::string const & name);
diff --git a/kapi/kapi/devices/manager.hpp b/kapi/kapi/devices/manager.hpp
index 499b79ab..25b22510 100644
--- a/kapi/kapi/devices/manager.hpp
+++ b/kapi/kapi/devices/manager.hpp
@@ -7,7 +7,6 @@
#include <kstd/memory.hpp>
-#include <cstddef>
#include <string_view>
namespace kapi::devices
@@ -16,11 +15,6 @@ namespace kapi::devices
//! @addtogroup kapi-devices-kernel-defined
//! @{
- //! Ask the kernel to allocate a new major number.
- //!
- //! @return a new, unused major number.
- auto allocate_major_number() -> std::size_t;
-
//! Register a new device with the kernel's device manager.
//!
//! @param device The device to register.