summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@kernel.org>2024-10-04 17:41:16 +0200
committerMiguel Ojeda <ojeda@kernel.org>2024-10-15 22:56:59 +0200
commit8373147ce4961665c5700016b1c76299e962d077 (patch)
treeb49d5aef56beed14572c1053dfeae7838883f1d3 /drivers/block
parentc8cfa8d0c0b10be216861fe904ea68978b1dcc97 (diff)
rust: treewide: switch to our kernel `Box` type
Now that we got the kernel `Box` type in place, convert all existing `Box` users to make use of it. Reviewed-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Benno Lossin <benno.lossin@proton.me> Reviewed-by: Gary Guo <gary@garyguo.net> Signed-off-by: Danilo Krummrich <dakr@kernel.org> Link: https://lore.kernel.org/r/20241004154149.93856-13-dakr@kernel.org Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/rnull.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/rnull.rs b/drivers/block/rnull.rs
index b0227cf9ddd3..5de7223beb4d 100644
--- a/drivers/block/rnull.rs
+++ b/drivers/block/rnull.rs
@@ -32,7 +32,7 @@ module! {
}
struct NullBlkModule {
- _disk: Pin<Box<Mutex<GenDisk<NullBlkDevice>>>>,
+ _disk: Pin<KBox<Mutex<GenDisk<NullBlkDevice>>>>,
}
impl kernel::Module for NullBlkModule {
@@ -47,7 +47,7 @@ impl kernel::Module for NullBlkModule {
.rotational(false)
.build(format_args!("rnullb{}", 0), tagset)?;
- let disk = Box::pin_init(new_mutex!(disk, "nullb:disk"), flags::GFP_KERNEL)?;
+ let disk = KBox::pin_init(new_mutex!(disk, "nullb:disk"), flags::GFP_KERNEL)?;
Ok(Self { _disk: disk })
}