We have all information available also in THIS_MODULE. All users use
that already so there is no users for this anymore so remove it.
Signed-off-by: Kari Argillander <kari.argillander@gmail.com>
---
rust/kernel/lib.rs | 6 ------
rust/macros/module.rs | 8 --------
2 files changed, 14 deletions(-)
diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs
index d6111a44fb3a..3acc60a83b09 100644
--- a/rust/kernel/lib.rs
+++ b/rust/kernel/lib.rs
@@ -201,12 +201,6 @@ fn init() -> impl pin_init::PinInit<Self, error::Error> {
}
}
-/// Metadata attached to a [`Module`] or [`InPlaceModule`].
-pub trait ModuleMetadata {
- /// The name of the module as specified in the `module!` macro.
- const NAME: &'static crate::str::CStr;
-}
-
/// Equivalent to `THIS_MODULE` in the C API.
///
/// C header: [`include/linux/init.h`](srctree/include/linux/init.h)
diff --git a/rust/macros/module.rs b/rust/macros/module.rs
index 7473a377a3bd..97635aed1598 100644
--- a/rust/macros/module.rs
+++ b/rust/macros/module.rs
@@ -374,14 +374,6 @@ pub(crate) fn module(ts: TokenStream) -> TokenStream {
::kernel::create_this_module!(\"{name}\");
- /// The `LocalModule` type is the type of the module created by `module!`,
- /// `module_pci_driver!`, `module_platform_driver!`, etc.
- type LocalModule = {type_};
-
- impl ::kernel::ModuleMetadata for {type_} {{
- const NAME: &'static ::kernel::str::CStr = c\"{name}\";
- }}
-
// Double nested modules, since then nobody can access the public items inside.
mod __module_init {{
mod __module_init {{
--
2.43.0