]> www.infradead.org Git - users/dwmw2/linux.git/commit
rust: module: add trait `ModuleMetadata`
authorDanilo Krummrich <dakr@kernel.org>
Thu, 19 Dec 2024 17:04:03 +0000 (18:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Dec 2024 16:19:25 +0000 (17:19 +0100)
commita790265c7f663c382ac25ecb841e241a023f0590
treeaacf999532ee25bc00a1f1bced7a9dd11277f13a
parent5bcc8bfe841b29f7d62f4bb7738bb085ecc51aad
rust: module: add trait `ModuleMetadata`

In order to access static metadata of a Rust kernel module, add the
`ModuleMetadata` trait.

In particular, this trait provides the name of a Rust kernel module as
specified by the `module!` macro.

Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Tested-by: Dirk Behme <dirk.behme@de.bosch.com>
Tested-by: Fabien Parent <fabien.parent@linaro.org>
Link: https://lore.kernel.org/r/20241219170425.12036-2-dakr@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
rust/kernel/lib.rs
rust/macros/module.rs