Thread View: org.kernel.vger.linux-pci
1 messages
1 total messages
Started by Andrew Ballance
Fri, 09 May 2025 03:15
[PATCH 11/11] rust: devres: fix doctest
Author: Andrew Ballance
Date: Fri, 09 May 2025 03:15
Date: Fri, 09 May 2025 03:15
31 lines
6036 bytes
6036 bytes
fix a doc test to use the new Io api.
Signed-off-by: Andrew Ballance <andrewjballance@gmail.com>
---
rust/kernel/devres.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rust/kernel/devres.rs b/rust/kernel/devres.rs
index ddb1ce4a78d9..88d145821ca8 100644
--- a/rust/kernel/devres.rs
+++ b/rust/kernel/devres.rs
@@ -45,7 +45,7 @@ struct DevresInner<T> {
/// # Example
///
/// ```no_run
-/// # use kernel::{bindings, c_str, device::Device, devres::Devres, io::{Io, IoRaw}};
+/// # use kernel::{bindings, c_str, device::Device, devres::Devres, io::{Io, IoRaw, IoAccess}};
/// # use core::ops::Deref;
///
/// // See also [`pci::Bar`] for a real example.
@@ -80,7 +80,7 @@ struct DevresInner<T> {
///
/// fn deref(&self) -> &Self::Target {
/// // SAFETY: The memory range stored in `self` has been properly mapped in `Self::new`.
-/// unsafe { Io::from_raw(&self.0) }
+/// unsafe { Io::from_raw_ref(&self.0) }
/// }
/// }
/// # fn no_run() -> Result<(), Error> {
--
2.49.0
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads