summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@redhat.com>2023-11-22 22:33:19 +0100
committerDanilo Krummrich <dakr@redhat.com>2023-11-22 22:33:19 +0100
commit66b014ea4b042cad8d4b8da42a1f39209fa890e6 (patch)
treebd2869bc6386628429199068f7ee5b513b4a56a4
parent0b747f3e591604d01e3cee131e8b6e053f097f24 (diff)
samples: rust: fix module init function signature
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
-rw-r--r--samples/rust/rust_minimal.rs2
-rw-r--r--samples/rust/rust_print.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/samples/rust/rust_minimal.rs b/samples/rust/rust_minimal.rs
index dc05f4bbe27e..54de32b78cec 100644
--- a/samples/rust/rust_minimal.rs
+++ b/samples/rust/rust_minimal.rs
@@ -17,7 +17,7 @@ struct RustMinimal {
}
impl kernel::Module for RustMinimal {
- fn init(_module: &'static ThisModule) -> Result<Self> {
+ fn init(_name: &'static CStr, _module: &'static ThisModule) -> Result<Self> {
pr_info!("Rust minimal sample (init)\n");
pr_info!("Am I built-in? {}\n", !cfg!(MODULE));
diff --git a/samples/rust/rust_print.rs b/samples/rust/rust_print.rs
index 67ed8ebf8e8e..3524f64ce7a0 100644
--- a/samples/rust/rust_print.rs
+++ b/samples/rust/rust_print.rs
@@ -40,7 +40,7 @@ fn arc_print() -> Result {
}
impl kernel::Module for RustPrint {
- fn init(_module: &'static ThisModule) -> Result<Self> {
+ fn init(_name: &'static CStr, _module: &'static ThisModule) -> Result<Self> {
pr_info!("Rust printing macros sample (init)\n");
pr_emerg!("Emergency message (level 0) without args\n");