Skip to content

Commit ce8409b

Browse files
committed
Removed uses of direct [Pin]Init implementors
1 parent 772e79c commit ce8409b

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

rust/kernel/sync/condvar.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use super::{Guard, Lock, LockClassKey, LockInfo};
99
use crate::{
1010
bindings,
11-
init::{PinInit, PinInitClosure},
11+
init::{self, PinInit},
1212
macros::pin_project,
1313
pin_init,
1414
str::CStr,
@@ -73,7 +73,7 @@ impl CondVar {
7373
Ok(())
7474
};
7575
// SAFETY: waitqueue has been initialized
76-
unsafe { PinInitClosure::from_closure(init) }
76+
unsafe { init::pin_init_from_closure(init) }
7777
}
7878
pin_init!(Self {
7979
wait_list: init_wait_list(name, key),

rust/kernel/sync/mutex.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use super::{Guard, Lock, LockClassKey, LockFactory, WriteLock};
88
use crate::{
99
bindings,
10-
init::{PinInit, PinInitClosure},
10+
init::{self, PinInit},
1111
macros::pin_project,
1212
pin_init,
1313
str::CStr,
@@ -93,7 +93,7 @@ unsafe impl<T> PinInit<Mutex<T>> for MutexInit<T> {
9393
Ok(())
9494
};
9595
// SAFETY: mutex has been initialized
96-
unsafe { PinInitClosure::from_closure(init) }
96+
unsafe { init::pin_init_from_closure(init) }
9797
}
9898
let init = pin_init!(Mutex<T> {
9999
mutex: init_mutex(self.name, self.key),

rust/kernel/sync/rwsem.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use super::{
1111
};
1212
use crate::{
1313
bindings,
14-
init::{PinInit, PinInitClosure},
14+
init::{self, PinInit},
1515
macros::pin_project,
1616
pin_init,
1717
str::CStr,
@@ -95,7 +95,7 @@ unsafe impl<T> PinInit<RwSemaphore<T>> for Init<T> {
9595
bindings::__init_rwsem(Opaque::raw_get(slot), name.as_char_ptr(), key.get());
9696
Ok(())
9797
};
98-
unsafe { PinInitClosure::from_closure(init) }
98+
unsafe { init::pin_init_from_closure(init) }
9999
}
100100
let init = pin_init!(RwSemaphore<T> {
101101
rwsem: init_rw_semaphore(self.name, self.key),

rust/kernel/sync/seqlock.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use super::{Guard, Lock, LockClassKey, LockFactory, ReadLock};
1111
use crate::{
1212
bindings,
13-
init::{PinInit, PinInitClosure},
13+
init::{self, PinInit},
1414
macros::pin_project,
1515
pin_init,
1616
str::CStr,
@@ -111,7 +111,7 @@ impl<L: Lock> SeqLock<L> {
111111
};
112112
Ok(())
113113
};
114-
unsafe { PinInitClosure::from_closure(init) }
114+
unsafe { init::pin_init_from_closure(init) }
115115
}
116116
pin_init!(Self {
117117
_p: PhantomPinned,

rust/kernel/sync/spinlock.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use super::{
1111
};
1212
use crate::{
1313
bindings,
14-
init::{PinInit, PinInitClosure},
14+
init::{self, PinInit},
1515
macros::pin_project,
1616
pin_init,
1717
str::CStr,
@@ -137,7 +137,7 @@ unsafe impl<T> PinInit<SpinLock<T>> for Init<T> {
137137
bindings::__spin_lock_init(Opaque::raw_get(slot), name.as_char_ptr(), key.get());
138138
Ok(())
139139
};
140-
unsafe { PinInitClosure::from_closure(init) }
140+
unsafe { init::pin_init_from_closure(init) }
141141
}
142142
let init = pin_init!(SpinLock<T> {
143143
spin_lock: init_spinlock(self.name, self.key),
@@ -335,7 +335,7 @@ unsafe impl<T> PinInit<RawSpinLock<T>> for RInit<T> {
335335
);
336336
Ok(())
337337
};
338-
unsafe { PinInitClosure::from_closure(init) }
338+
unsafe { init::pin_init_from_closure(init) }
339339
}
340340
let init = pin_init!(RawSpinLock<T> {
341341
spin_lock: init_spinlock(self.name, self.key),

0 commit comments

Comments
 (0)