Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 104773
b: refs/heads/master
c: 838ea8e
h: refs/heads/master
i:
  104771: 3054c99
v: v3
  • Loading branch information
Ben Dooks authored and Greg Kroah-Hartman committed Jul 22, 2008
1 parent e7892b0 commit 21d57ee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 185000fc556372b7fb7f26516c325f212030dbd3
refs/heads/master: 838ea8e8dbfc8d907c7a55bbad507a44c1b81d57
11 changes: 8 additions & 3 deletions trunk/drivers/base/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ static struct kset *system_kset;

int sysdev_class_register(struct sysdev_class * cls)
{
pr_debug("Registering sysdev class '%s'\n",
kobject_name(&cls->kset.kobj));
pr_debug("Registering sysdev class '%s'\n", cls->name);

INIT_LIST_HEAD(&cls->drivers);
memset(&cls->kset.kobj, 0x00, sizeof(struct kobject));
cls->kset.kobj.parent = &system_kset->kobj;
Expand Down Expand Up @@ -241,7 +241,8 @@ int sysdev_register(struct sys_device * sysdev)
if (!cls)
return -EINVAL;

pr_debug("Registering sys device '%s'\n", kobject_name(&sysdev->kobj));
pr_debug("Registering sys device of class '%s'\n",
kobject_name(&cls->kset.kobj));

/* initialize the kobject to 0, in case it had previously been used */
memset(&sysdev->kobj, 0x00, sizeof(struct kobject));
Expand All @@ -257,6 +258,9 @@ int sysdev_register(struct sys_device * sysdev)
if (!error) {
struct sysdev_driver * drv;

pr_debug("Registering sys device '%s'\n",
kobject_name(&sysdev->kobj));

mutex_lock(&sysdev_drivers_lock);
/* Generic notification is implicit, because it's that
* code that should have called us.
Expand All @@ -269,6 +273,7 @@ int sysdev_register(struct sys_device * sysdev)
}
mutex_unlock(&sysdev_drivers_lock);
}

kobject_uevent(&sysdev->kobj, KOBJ_ADD);
return error;
}
Expand Down

0 comments on commit 21d57ee

Please sign in to comment.