summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>2020-09-08 15:46:13 +0200
committerMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>2020-09-08 16:38:02 +0200
commit0a99f235bd70ef6a8e5bed61e17f312b9839db56 (patch)
treec9ab0fd92d707e3f3006c9f0c032928b9c4a1ee8 /drivers/char
parentd55f1d91ca0440d35d5908589dce7ea353cd57d1 (diff)
Remove arch/ blocker by passing CONFIG vars to emulate module_init fully
Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/rust_example/src/lib.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/rust_example/src/lib.rs b/drivers/char/rust_example/src/lib.rs
index 9f542d6929db..56562b840d9c 100644
--- a/drivers/char/rust_example/src/lib.rs
+++ b/drivers/char/rust_example/src/lib.rs
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#![no_std]
+#![feature(global_asm)]
use kernel::prelude::*;
@@ -11,7 +12,7 @@ struct RustExample {
impl KernelModule for RustExample {
fn init() -> KernelResult<Self> {
println!("Rust Example (init)");
- println!("Am I built-in? {}", !cfg!(module));
+ println!("Am I built-in? {}", !cfg!(MODULE));
Ok(RustExample {
message: "on the heap!".to_owned(),
})