Skip to contentSkip to conversation

rust: serdev: replace `__pinned_init` with `raw_try_init`

PATCH New Miguel Ojeda 1 participant 1 message Aug 7

Subsystems (4)
lore
Share & tools
lore

Miguel Ojeda

author maintainer
#0 lore raw

PATCH 1/1 rust: serdev: replace `__pinned_init` with `raw_try_init`

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.

---
 rust/kernel/serdev.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
rust/kernel/serdev.rs +1 -1
index c0cd24481ee3..a4927452016e 100644
@@ -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