summaryrefslogtreecommitdiffstats
path: root/kernel/params.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2007-01-18 13:26:15 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2007-02-07 10:37:12 -0800
commit270a6c4cad809e92d7b81adde92d0b3d94eeb8ee (patch)
treeb85706ef52535fb2b421b475472b7071b1572590 /kernel/params.c
parent80f745fb1b0fb11383cbb8df2c36aaaa0399b6e6 (diff)
downloadlinux-stable-270a6c4cad809e92d7b81adde92d0b3d94eeb8ee.tar.gz
linux-stable-270a6c4cad809e92d7b81adde92d0b3d94eeb8ee.tar.bz2
linux-stable-270a6c4cad809e92d7b81adde92d0b3d94eeb8ee.zip
/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.c17
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 @@
#define DEBUGP(fmt, a...)
#endif
+static struct kobj_type module_ktype;
+
static inline char dash2underscore(char c)
{
if (c == '-')
@@ -671,6 +673,19 @@ static struct sysfs_ops module_sysfs_ops = {
.store = module_attr_store,
};
+static int uevent_filter(struct kset *kset, struct kobject *kobj)
+{
+ struct kobj_type *ktype = get_ktype(kobj);
+
+ if (ktype == &module_ktype)
+ return 1;
+ return 0;
+}
+
+static struct kset_uevent_ops module_uevent_ops = {
+ .filter = uevent_filter,
+};
+
#else
static struct sysfs_ops module_sysfs_ops = {
.show = NULL,
@@ -682,7 +697,7 @@ static struct kobj_type module_ktype = {
.sysfs_ops = &module_sysfs_ops,
};
-decl_subsys(module, &module_ktype, NULL);
+decl_subsys(module, &module_ktype, &module_uevent_ops);
/*
* param_sysfs_init - wrapper for built-in params support