summaryrefslogtreecommitdiff
path: root/rust/kernel/init.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/kernel/init.rs')
-rw-r--r--rust/kernel/init.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/rust/kernel/init.rs b/rust/kernel/init.rs
index 05a12e869a57..1fdc3963e3e3 100644
--- a/rust/kernel/init.rs
+++ b/rust/kernel/init.rs
@@ -158,7 +158,9 @@ pub trait InPlaceInit<T>: Sized {
{
// SAFETY: We delegate to `init` and only change the error type.
let init = unsafe {
- pin_init_from_closure(|slot| init.__pinned_init(slot).map_err(|e| Error::from(e)))
+ pin_init_from_closure(|slot| {
+ pin_init::raw_try_init(slot, init).map_err(|e| Error::from(e))
+ })
};
Self::try_pin_init(init, flags)
}
@@ -176,7 +178,7 @@ pub trait InPlaceInit<T>: Sized {
{
// SAFETY: We delegate to `init` and only change the error type.
let init = unsafe {
- init_from_closure(|slot| init.__pinned_init(slot).map_err(|e| Error::from(e)))
+ init_from_closure(|slot| pin_init::raw_try_init(slot, init).map_err(|e| Error::from(e)))
};
Self::try_init(init, flags)
}