Skip to content

Commit 35b371c

Browse files
committed
fixup! rust: drm: mm: Add DRM MM Range Allocator abstraction
1 parent b132c17 commit 35b371c

1 file changed

Lines changed: 4 additions & 14 deletions

File tree

rust/kernel/drm/mm.rs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
use crate::{
88
bindings,
99
error::{to_result, Result},
10-
str::CStr,
11-
sync::{Arc, LockClassKey, Mutex, UniqueArc},
10+
sync::{Arc, Mutex, UniqueArc},
1211
types::Opaque,
1312
};
1413

@@ -164,19 +163,10 @@ impl<A: AllocInner<T>, T> Allocator<A, T> {
164163
///
165164
/// The user may optionally provide an inner object representing allocator state, which will
166165
/// be protected by the same lock. If not required, `()` can be used.
167-
pub fn new(
168-
start: u64,
169-
size: u64,
170-
inner: A,
171-
name: &'static CStr,
172-
lock_key: LockClassKey,
173-
) -> Result<Allocator<A, T>> {
166+
#[track_caller]
167+
pub fn new(start: u64, size: u64, inner: A) -> Result<Allocator<A, T>> {
174168
// SAFETY: We call `Mutex::init_lock` below.
175-
let mm = UniqueArc::pin_init(Mutex::new(
176-
MmInner(Opaque::uninit(), inner, PhantomData),
177-
name,
178-
lock_key,
179-
))?;
169+
let mm = UniqueArc::pin_init(Mutex::new(MmInner(Opaque::uninit(), inner, PhantomData)))?;
180170

181171
unsafe {
182172
// SAFETY: The Opaque instance provides a valid pointer, and it is initialized after

0 commit comments

Comments
 (0)