DORMANTno replies

[PATCH] rust: serdev: replace `__pinned_init` with `raw_try_init`

From: Miguel Ojeda <ojeda@kernel.org>
Date: 2026-08-07 07:47:51
Also in: driver-core, rust-for-linux
Subsystem: rust, serial device bus, the rest · Maintainers: Miguel Ojeda, Markus Probst, Linus Torvalds

Commit

  ea7da3116015 ("rust: treewide: replace `__pinned_init` with `raw_[try_]init`")

from the pin-init tree replaced the method before removing it, but commit

  99f59aa82341 ("rust: add basic serial device bus abstractions")

from the driver-core tree added a new use.

Thus replace that one as well.

Link: https://lore.kernel.org/rust-for-linux/5ce12a15-3f1e-4279-9b1a-57d6b2faf7c9@sirena.org.uk/ (local)
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
 rust/kernel/serdev.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rust/kernel/serdev.rs b/rust/kernel/serdev.rs
index c0cd24481ee3..a4927452016e 100644
--- a/rust/kernel/serdev.rs
+++ b/rust/kernel/serdev.rs
@@ -197,7 +197,7 @@ extern "C" fn probe_callback(sdev: *mut bindings::serdev_device) -> kernel::ffi:
             // SAFETY:
             // - `driver.as_mut_ptr()` is a valid pointer to uninitialized data.
             // - `private_data.driver` is pinned.
-            let result = unsafe { data.__pinned_init(driver.as_mut_ptr()) };
+            let result = unsafe { pin_init::raw_try_init(driver.as_mut_ptr(), data) };

             *active = result.is_ok();

base-commit: 1fc711bb8253ffd6fdfcf262bbccac53e8e9ff67
--
2.55.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help