Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f0ee61a6cecd100301a60d99feb187776533b2a2
Commit:     f0ee61a6cecd100301a60d99feb187776533b2a2
Parent:     1901fb2604fbcd53201f38725182ea807581159e
Author:     Greg Kroah-Hartman <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 23 10:40:54 2006 -0700
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Fri Dec 1 14:51:58 2006 -0800

    Driver Core: Move virtual_device_parent() to core.c
    
    It doesn't need to be global or in device.h
    
    
    Cc: Kay Sievers <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/base/class.c   |   17 -----------------
 drivers/base/core.c    |   17 +++++++++++++++++
 include/linux/device.h |    2 --
 3 files changed, 17 insertions(+), 19 deletions(-)

diff --git a/drivers/base/class.c b/drivers/base/class.c
index 0ff267a..2e705f6 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -893,23 +893,6 @@ void class_interface_unregister(struct c
        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;
diff --git a/drivers/base/core.c b/drivers/base/core.c
index d4f35d8..dbcd40b 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -384,6 +384,23 @@ void device_initialize(struct device *de
        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.
diff --git a/include/linux/device.h b/include/linux/device.h
index b00e027..00b29e0 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -440,8 +440,6 @@ extern struct device *device_create(stru
                                    __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
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to