Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1452850
| From | Cristina Moraru <cristina.moraru09@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [RFC PATCH 1/3] Add kconfig_symbol attribute to struct module |
| Date | 2016-07-31 17:40 +0200 |
| Message-ID | <s110l-1W3-11@gated-at.bofh.it> (permalink) |
| References | <s110l-1W3-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Create additional attribute in struct module
in order for each module to store its associate
kconfig CONFIG_* symbol.
The goal is to enable each module to expose in
/sys its corresponding CONFIG_* option. The value
of this attribute will be dynamically pegged by
modpost without requiring extra work from the
driver developers. Further, this information will
be used by a hardware interogation tool to extract
build information about the existent devices.
This patch is part of a research project within
Google Summer of Code of porting 'make localmodconfig'
for backported drivers.
Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
---
include/linux/module.h | 1 +
kernel/module.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/include/linux/module.h b/include/linux/module.h
index 3daf2b3..bef5e44 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -353,6 +353,7 @@ struct module {
struct module_attribute *modinfo_attrs;
const char *version;
const char *srcversion;
+ const char *kconfig_symbol;
struct kobject *holders_dir;
/* Exported symbols */
diff --git a/kernel/module.c b/kernel/module.c
index 5f71aa6..4463c6c 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -757,6 +757,7 @@ static struct module_attribute modinfo_##field = { \
MODINFO_ATTR(version);
MODINFO_ATTR(srcversion);
+MODINFO_ATTR(kconfig_symbol);
static char last_unloaded_module[MODULE_NAME_LEN+1];
--
2.7.4
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[RFC PATCH 1/3] Add kconfig_symbol attribute to struct module Cristina Moraru <cristina.moraru09@gmail.com> - 2016-07-31 17:40 +0200
csiph-web