The doc examples in io.rs and devres.rs directly call
bindings::ioremap() and bindings::iounmap(), which do not exist when
CONFIG_HAS_IOMEM is not set. This causes build failures with
CONFIG_RUST_KERNEL_DOCTESTS=y on such configurations (e.g. s390
allnoconfig).
Gate the affected doctests with `#![cfg(CONFIG_HAS_IOMEM)]` so they are
skipped when IOMEM is unavailable.
Fixes: 3f70ebe63858 ("s390: Enable Rust support")
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20260805212920.1996937-2-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
/// # Examples
///
/// ```no_run
+/// # #![cfg(CONFIG_HAS_IOMEM)]
/// use kernel::{
/// bindings,
/// device::{
/// # Examples
///
/// ```no_run
+/// # #![cfg(CONFIG_HAS_IOMEM)]
/// use kernel::{
/// bindings,
/// ffi::c_void,