Skip to content

Commit 40ba7e6

Browse files
committed
fixup! rust: soc: apple: rtkit: Add Apple RTKit abstraction
Signed-off-by: Janne Grunau <j@jannau.net>
1 parent c1a65f4 commit 40ba7e6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

rust/kernel/soc/apple/rtkit.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
//! C header: [`include/linux/soc/apple/rtkit.h`](../../../../include/linux/gpio/driver.h)
66
77
use crate::{
8+
alloc::{box_ext::BoxExt, flags::*},
89
bindings, device,
910
error::{code::*, from_err_ptr, from_result, to_result, Result},
1011
str::CStr,
@@ -148,7 +149,7 @@ unsafe extern "C" fn shmem_setup_callback<T: Operations>(
148149

149150
// Now box the returned buffer type and stash it in the private pointer of the
150151
// `apple_rtkit_shmem` struct for safekeeping.
151-
let boxed = Box::try_new(buf)?;
152+
let boxed = Box::new(buf, GFP_KERNEL)?;
152153
bfr_mut.private = Box::into_raw(boxed) as *mut _;
153154
Ok(0)
154155
})

0 commit comments

Comments
 (0)