Skip to content

Commit 825e9a4

Browse files
committed
rust: Make the io_mem crate depend on CONFIG_HAS_IOMEM
The kernel iomem functions are not available on all architectures, in all configurations, so hide the rust bindings behind CONFIG_HAS_IOMEM. This is required for rust to work under UML. Signed-off-by: David Gow <davidgow@google.com>
1 parent 165a7fa commit 825e9a4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

rust/kernel/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ pub mod sync;
8787
pub mod sysctl;
8888

8989
pub mod io_buffer;
90+
#[cfg(CONFIG_HAS_IOMEM)]
9091
pub mod io_mem;
9192
pub mod iov_iter;
9293
pub mod of;

0 commit comments

Comments
 (0)