diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2007-01-18 07:26:15 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-07 13:37:12 -0500 |
commit | 270a6c4cad809e92d7b81adde92d0b3d94eeb8ee (patch) | |
tree | b85706ef52535fb2b421b475472b7071b1572590 /kernel/params.c | |
parent | 80f745fb1b0fb11383cbb8df2c36aaaa0399b6e6 (diff) |
/sys/modules/*/holders
/sys/module/usbcore/
|-- drivers
| |-- usb:hub -> ../../../subsystem/usb/drivers/hub
| |-- usb:usb -> ../../../subsystem/usb/drivers/usb
| `-- usb:usbfs -> ../../../subsystem/usb/drivers/usbfs
|-- holders
| |-- ehci_hcd -> ../../../module/ehci_hcd
| |-- uhci_hcd -> ../../../module/uhci_hcd
| |-- usb_storage -> ../../../module/usb_storage
| `-- usbhid -> ../../../module/usbhid
|-- initstate
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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 |