Convert `pub use ffi` to `pub mod ffi` in lib.rs and create the corresponding `rust/kernel/ffi/mod.rs` module file. Also re-export all C type definitions from `ffi` crate so that existing `kernel::ffi::c_int` etc. paths continue to work.
This prepares the ffi module to host additional sub-modules in later patches (clist). Signed-off-by: Joel Fernandes <[email protected]> --- rust/kernel/ffi/mod.rs | 7 +++++++ rust/kernel/lib.rs | 3 +-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 rust/kernel/ffi/mod.rs diff --git a/rust/kernel/ffi/mod.rs b/rust/kernel/ffi/mod.rs new file mode 100644 index 000000000000..7d844e9cb339 --- /dev/null +++ b/rust/kernel/ffi/mod.rs @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0 + +//! FFI infrastructure for interfacing with C code. + +// Re-export C type definitions from the `ffi` crate so that existing +// `kernel::ffi::c_int` etc. paths continue to work. +pub use ::ffi::*; diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs index 3da92f18f4ee..0a77b4c0ffeb 100644 --- a/rust/kernel/lib.rs +++ b/rust/kernel/lib.rs @@ -62,8 +62,6 @@ // Allow proc-macros to refer to `::kernel` inside the `kernel` crate (this crate). extern crate self as kernel; -pub use ffi; - pub mod acpi; pub mod alloc; #[cfg(CONFIG_AUXILIARY_BUS)] @@ -93,6 +91,7 @@ pub mod drm; pub mod error; pub mod faux; +pub mod ffi; #[cfg(CONFIG_RUST_FW_LOADER_ABSTRACTIONS)] pub mod firmware; pub mod fmt; -- 2.34.1
