/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>
This commit is contained in:
Kay Sievers
2007-01-18 13:26:15 +01:00
committed by Greg Kroah-Hartman
parent 80f745fb1b
commit 270a6c4cad
3 changed files with 48 additions and 7 deletions
+16 -1
View File
@@ -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