Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 65315
b: refs/heads/master
c: 3eb215d
h: refs/heads/master
i:
  65313: a03ca3d
  65311: a9e7efe
v: v3
  • Loading branch information
Dmitry Torokhov authored and Linus Torvalds committed Oct 7, 2007
1 parent 1fbb726 commit e320520
Show file tree
Hide file tree
Showing 2 changed files with 8 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: 85923b124624eb49ebef4731bb6b5670e792ff57
refs/heads/master: 3eb215de26e6e94bf5fed9cb77230c383b30e53b
10 changes: 7 additions & 3 deletions trunk/drivers/base/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,9 +586,13 @@ void device_initialize(struct device *dev)
static struct kobject * get_device_parent(struct device *dev,
struct device *parent)
{
/* Set the parent to the class, not the parent device */
/* this keeps sysfs from having a symlink to make old udevs happy */
if (dev->class)
/*
* Set the parent to the class, not the parent device
* for topmost devices in class hierarchy.
* This keeps sysfs from having a symlink to make old
* udevs happy
*/
if (dev->class && (!parent || parent->class != dev->class))
return &dev->class->subsys.kobj;
else if (parent)
return &parent->kobj;
Expand Down

0 comments on commit e320520

Please sign in to comment.