diff options
| author | Gary Guo <gary@garyguo.net> | 2026-07-29 16:38:46 +0100 |
|---|---|---|
| committer | Gary Guo <gary@garyguo.net> | 2026-08-05 11:36:18 +0100 |
| commit | ea7da3116015de801840f3e011dee907fb118f0c (patch) | |
| tree | 0b091d682c38d30ba30c10f77029a507d19b8cc2 /rust/macros | |
| parent | d5492db2bf30b7e617e41d4fe3dba22475a1a354 (diff) | |
| download | linux-next-ea7da3116015de801840f3e011dee907fb118f0c.tar.gz linux-next-ea7da3116015de801840f3e011dee907fb118f0c.zip | |
rust: treewide: replace `__pinned_init` with `raw_[try_]init`
The `__init` method is not designed to be a public API (existence of "__"
is a hint for this); replace users with `pin_init::raw_[try_]init` which
does the same thing.
There are a few users of `__init` which are replaced as well.
Acked-by: Miguel Ojeda <ojeda@kernel.org>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patch.msgid.link/20260729-merge-init-v2-4-26adf47109e7@garyguo.net
Signed-off-by: Gary Guo <gary@garyguo.net>
Diffstat (limited to 'rust/macros')
| -rw-r--r-- | rust/macros/module.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/macros/module.rs b/rust/macros/module.rs index 06c18e207508..d2d186d9d78c 100644 --- a/rust/macros/module.rs +++ b/rust/macros/module.rs @@ -621,7 +621,7 @@ pub(crate) fn module(info: ModuleInfo) -> Result<TokenStream> { // SAFETY: No data race, since `__MOD` can only be accessed by this module // and there only `__init` and `__exit` access it. These functions are only // called once and `__exit` cannot be called before or during `__init`. - match unsafe { initer.__pinned_init(__MOD.as_mut_ptr()) } { + match unsafe { ::pin_init::raw_try_init(__MOD.as_mut_ptr(), initer) } { Ok(m) => 0, Err(e) => e.to_errno(), } |
