Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41171
b: refs/heads/master
c: f0ee61a
h: refs/heads/master
i:
  41169: c347be8
  41167: 3e3e589
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Dec 1, 2006
1 parent bca35f4 commit 3586d90
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 20 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: 1901fb2604fbcd53201f38725182ea807581159e
refs/heads/master: f0ee61a6cecd100301a60d99feb187776533b2a2
17 changes: 0 additions & 17 deletions trunk/drivers/base/class.c
Original file line number Diff line number Diff line change
Expand Up @@ -893,23 +893,6 @@ void class_interface_unregister(struct class_interface *class_intf)
class_put(parent);
}

int virtual_device_parent(struct device *dev)
{
if (!dev->class)
return -ENODEV;

if (!dev->class->virtual_dir) {
static struct kobject *virtual_dir = NULL;

if (!virtual_dir)
virtual_dir = kobject_add_dir(&devices_subsys.kset.kobj, "virtual");
dev->class->virtual_dir = kobject_add_dir(virtual_dir, dev->class->name);
}

dev->kobj.parent = dev->class->virtual_dir;
return 0;
}

int __init classes_init(void)
{
int retval;
Expand Down
17 changes: 17 additions & 0 deletions trunk/drivers/base/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,23 @@ void device_initialize(struct device *dev)
device_init_wakeup(dev, 0);
}

static int virtual_device_parent(struct device *dev)
{
if (!dev->class)
return -ENODEV;

if (!dev->class->virtual_dir) {
static struct kobject *virtual_dir = NULL;

if (!virtual_dir)
virtual_dir = kobject_add_dir(&devices_subsys.kset.kobj, "virtual");
dev->class->virtual_dir = kobject_add_dir(virtual_dir, dev->class->name);
}

dev->kobj.parent = dev->class->virtual_dir;
return 0;
}

/**
* device_add - add device to device hierarchy.
* @dev: device.
Expand Down
2 changes: 0 additions & 2 deletions trunk/include/linux/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,6 @@ extern struct device *device_create(struct class *cls, struct device *parent,
__attribute__((format(printf,4,5)));
extern void device_destroy(struct class *cls, dev_t devt);

extern int virtual_device_parent(struct device *dev);

/*
* Platform "fixup" functions - allow the platform to have their say
* about devices and actions that the general device layer doesn't
Expand Down

0 comments on commit 3586d90

Please sign in to comment.