diff options
Diffstat (limited to 'kernel/params.c')
-rw-r--r-- | kernel/params.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/kernel/params.c b/kernel/params.c index cbaac85942d5..553cf7d6a4be 100644 --- a/kernel/params.c +++ b/kernel/params.c | |||
@@ -30,6 +30,8 @@ | |||
30 | #define DEBUGP(fmt, a...) | 30 | #define DEBUGP(fmt, a...) |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | static struct kobj_type module_ktype; | ||
34 | |||
33 | static inline char dash2underscore(char c) | 35 | static inline char dash2underscore(char c) |
34 | { | 36 | { |
35 | if (c == '-') | 37 | if (c == '-') |
@@ -671,6 +673,19 @@ static struct sysfs_ops module_sysfs_ops = { | |||
671 | .store = module_attr_store, | 673 | .store = module_attr_store, |
672 | }; | 674 | }; |
673 | 675 | ||
676 | static int uevent_filter(struct kset *kset, struct kobject *kobj) | ||
677 | { | ||
678 | struct kobj_type *ktype = get_ktype(kobj); | ||
679 | |||
680 | if (ktype == &module_ktype) | ||
681 | return 1; | ||
682 | return 0; | ||
683 | } | ||
684 | |||
685 | static struct kset_uevent_ops module_uevent_ops = { | ||
686 | .filter = uevent_filter, | ||
687 | }; | ||
688 | |||
674 | #else | 689 | #else |
675 | static struct sysfs_ops module_sysfs_ops = { | 690 | static struct sysfs_ops module_sysfs_ops = { |
676 | .show = NULL, | 691 | .show = NULL, |
@@ -682,7 +697,7 @@ static struct kobj_type module_ktype = { | |||
682 | .sysfs_ops = &module_sysfs_ops, | 697 | .sysfs_ops = &module_sysfs_ops, |
683 | }; | 698 | }; |
684 | 699 | ||
685 | decl_subsys(module, &module_ktype, NULL); | 700 | decl_subsys(module, &module_ktype, &module_uevent_ops); |
686 | 701 | ||
687 | /* | 702 | /* |
688 | * param_sysfs_init - wrapper for built-in params support | 703 | * param_sysfs_init - wrapper for built-in params support |