Skip to content

Commit 8c8c011

Browse files
committed
fixup! *RFL import: The rest of kernel::device (minus clk stuff)
Signed-off-by: Janne Grunau <j@jannau.net>
1 parent 04f3dd8 commit 8c8c011

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

rust/kernel/device.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
//! C header: [`include/linux/device.h`](../../../../include/linux/device.h)
66
77
use crate::{
8+
alloc::flags::*,
89
bindings,
910
error::Result,
1011
macros::pin_data,
@@ -276,11 +277,14 @@ impl<T, U, V> Data<T, U, V> {
276277
name: &'static CStr,
277278
key1: LockClassKey,
278279
) -> Result<Pin<UniqueArc<Self>>> {
279-
let ret = UniqueArc::pin_init(pin_init!(Self {
280-
registrations <- Mutex::new_with_key(registrations, name, key1),
281-
resources,
282-
general,
283-
}))?;
280+
let ret = UniqueArc::pin_init(
281+
pin_init!(Self {
282+
registrations <- Mutex::new_with_key(registrations, name, key1),
283+
resources,
284+
general,
285+
}),
286+
GFP_KERNEL,
287+
)?;
284288
Ok(ret)
285289
}
286290

0 commit comments

Comments
 (0)