summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@kernel.org>2024-10-15 16:04:37 +0200
committerDanilo Krummrich <dakr@kernel.org>2024-10-22 20:00:40 +0200
commit201e3970b3ab058124c727a4d9b707ef8ff09de4 (patch)
tree45c091fd4231ffd9349cc19c1932c63e325d9e0d /drivers
parentc68f2dcb15df955adb567194785e056a55e5f9b0 (diff)
rust: pass module name to `Module::init`
In a subsequent patch we introduce the `Registration` abstraction used to register driver structures. Some subsystems require the module name on driver registration (e.g. PCI in __pci_register_driver()), hence pass the module name to `Module::init`. Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/rnull.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/rnull.rs b/drivers/block/rnull.rs
index 5de7223beb4d..0e0e9ed7851e 100644
--- a/drivers/block/rnull.rs
+++ b/drivers/block/rnull.rs
@@ -36,7 +36,7 @@ struct NullBlkModule {
}
impl kernel::Module for NullBlkModule {
- fn init(_module: &'static ThisModule) -> Result<Self> {
+ fn init(_name: &'static CStr, _module: &'static ThisModule) -> Result<Self> {
pr_info!("Rust null_blk loaded\n");
let tagset = Arc::pin_init(TagSet::new(1, 256, 1), flags::GFP_KERNEL)?;