aboutsummaryrefslogtreecommitdiff
path: root/kernel/kapi/devices/bus.cpp
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-09-09 23:02:20 +0200
committerFelix Morgner <felix.morgner@ost.ch>2026-09-09 23:02:20 +0200
commitb99b79d8080cc1491f96069677d9ce0b7775a4f0 (patch)
tree1f7a4534926a79ee6376770c63cccd2aa9e37442 /kernel/kapi/devices/bus.cpp
parent9438d08cc7a7f814d8d1b0cb13f4db176fc53aeb (diff)
downloadkernel-b99b79d8080cc1491f96069677d9ce0b7775a4f0.tar.xz
kernel-b99b79d8080cc1491f96069677d9ce0b7775a4f0.zip
chore: replace some naked pointers
The coding guidelines explicitly prohibit the use of "naked"/C-style pointers. However, there were some prominent examples in the kapi and the core kernel source. This changeset replaces them with the appropriate smart pointer types.
Diffstat (limited to 'kernel/kapi/devices/bus.cpp')
-rw-r--r--kernel/kapi/devices/bus.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/kapi/devices/bus.cpp b/kernel/kapi/devices/bus.cpp
index 300151d5..d956c3b8 100644
--- a/kernel/kapi/devices/bus.cpp
+++ b/kernel/kapi/devices/bus.cpp
@@ -84,15 +84,15 @@ namespace kapi::devices
return m_devices;
}
- auto bus::query_facet(kapi::capabilities::facet_id facet) -> void *
+ auto bus::query_facet(kapi::capabilities::facet_id facet) -> kstd::observer_ptr<void>
{
if (facet == bus::id)
{
- return this;
+ return kstd::observer_ptr(this);
}
else if (facet == bus_protocol::id)
{
- return m_protocol;
+ return kstd::observer_ptr{m_protocol};
}
return device::query_facet(facet);