Rust for Linux List
 help / color / mirror / Atom feed
* [PATCH] rust: serdev: replace `__pinned_init` with `raw_try_init`
@ 2026-08-07  7:47 Miguel Ojeda
  0 siblings, 0 replies; only message in thread
From: Miguel Ojeda @ 2026-08-07  7:47 UTC (permalink / raw)
  To: Mark Brown, Benno Lossin, Gary Guo, Greg Kroah-Hartman,
	Rafael J. Wysocki, Danilo Krummrich, Miguel Ojeda
  Cc: linux-next, rust-for-linux, driver-core, Boqun Feng,
	Björn Roy Baron, Andreas Hindborg, Alice Ryhl, Trevor Gross,
	Daniel Almeida, Tamir Duberstein, Alexandre Courbot,
	Onur Özkan

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/
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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-07  7:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-07  7:47 [PATCH] rust: serdev: replace `__pinned_init` with `raw_try_init` Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox