summaryrefslogtreecommitdiff
path: root/rust/kernel/device.rs
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@kernel.org>2026-01-12 13:32:43 +0100
committerDanilo Krummrich <dakr@kernel.org>2026-01-12 13:33:24 +0100
commit8f799b4e8cc0cf926019e40405dc3eab330ac643 (patch)
tree763878e9d6164a2bbeb2a0f8059ddb271b9f7570 /rust/kernel/device.rs
parente254b758976f651c47ec902d92306bd49f452ab0 (diff)
parent0f61b1860cc3f52aef9036d7235ed1f017632193 (diff)
Merge tag 'v6.19-rc5' into driver-core-next
We need the driver-core fixes in here as well to build on top of. Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'rust/kernel/device.rs')
-rw-r--r--rust/kernel/device.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/rust/kernel/device.rs b/rust/kernel/device.rs
index ec9b0945b74c..cb2348934676 100644
--- a/rust/kernel/device.rs
+++ b/rust/kernel/device.rs
@@ -20,8 +20,6 @@ use core::{
ptr, //
};
-use crate::str::CStrExt as _;
-
pub mod property;
// Assert that we can `read()` / `write()` a `TypeId` instance from / into `struct driver_type`.
@@ -73,8 +71,9 @@ static_assert!(core::mem::size_of::<bindings::driver_type>() >= core::mem::size_
///
/// # Implementing Bus Devices
///
-/// This section provides a guideline to implement bus specific devices, such as [`pci::Device`] or
-/// [`platform::Device`].
+/// This section provides a guideline to implement bus specific devices, such as:
+#[cfg_attr(CONFIG_PCI, doc = "* [`pci::Device`](kernel::pci::Device)")]
+/// * [`platform::Device`]
///
/// A bus specific device should be defined as follows.
///
@@ -166,7 +165,6 @@ static_assert!(core::mem::size_of::<bindings::driver_type>() >= core::mem::size_
///
/// [`AlwaysRefCounted`]: kernel::sync::aref::AlwaysRefCounted
/// [`impl_device_context_deref`]: kernel::impl_device_context_deref
-/// [`pci::Device`]: kernel::pci::Device
/// [`platform::Device`]: kernel::platform::Device
#[repr(transparent)]
pub struct Device<Ctx: DeviceContext = Normal>(Opaque<bindings::device>, PhantomData<Ctx>);