diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-07-03 17:31:12 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-23 17:52:08 -0500 |
commit | 40cf67c5fcc513406558c01b91129280208e57bf (patch) | |
tree | 99d1a152875e3ba751c7566bd1f755b18e33cb0e /drivers/base | |
parent | 9654640d0af8f2de40ff3807d3695109d3463f54 (diff) |
Driver core: remove class_device_rename
No one uses it, and it wasn't exported to modules, so remove it. The
only other user of it was the network code, which is now converted to
use struct device instead.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/class.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/drivers/base/class.c b/drivers/base/class.c index 1417e5cd4c6f..d5968128be2b 100644 --- a/drivers/base/class.c +++ b/drivers/base/class.c | |||
@@ -840,48 +840,6 @@ void class_device_destroy(struct class *cls, dev_t devt) | |||
840 | class_device_unregister(class_dev); | 840 | class_device_unregister(class_dev); |
841 | } | 841 | } |
842 | 842 | ||
843 | int class_device_rename(struct class_device *class_dev, char *new_name) | ||
844 | { | ||
845 | int error = 0; | ||
846 | char *old_class_name = NULL, *new_class_name = NULL; | ||
847 | |||
848 | class_dev = class_device_get(class_dev); | ||
849 | if (!class_dev) | ||
850 | return -EINVAL; | ||
851 | |||
852 | pr_debug("CLASS: renaming '%s' to '%s'\n", class_dev->class_id, | ||
853 | new_name); | ||
854 | |||
855 | #ifdef CONFIG_SYSFS_DEPRECATED | ||
856 | if (class_dev->dev) | ||
857 | old_class_name = make_class_name(class_dev->class->name, | ||
858 | &class_dev->kobj); | ||
859 | #endif | ||
860 | |||
861 | strlcpy(class_dev->class_id, new_name, KOBJ_NAME_LEN); | ||
862 | |||
863 | error = kobject_rename(&class_dev->kobj, new_name); | ||
864 | |||
865 | #ifdef CONFIG_SYSFS_DEPRECATED | ||
866 | if (class_dev->dev) { | ||
867 | new_class_name = make_class_name(class_dev->class->name, | ||
868 | &class_dev->kobj); | ||
869 | if (new_class_name) | ||
870 | sysfs_create_link(&class_dev->dev->kobj, | ||
871 | &class_dev->kobj, new_class_name); | ||
872 | if (old_class_name) | ||
873 | sysfs_remove_link(&class_dev->dev->kobj, | ||
874 | old_class_name); | ||
875 | } | ||
876 | #endif | ||
877 | class_device_put(class_dev); | ||
878 | |||
879 | kfree(old_class_name); | ||
880 | kfree(new_class_name); | ||
881 | |||
882 | return error; | ||
883 | } | ||
884 | |||
885 | struct class_device * class_device_get(struct class_device *class_dev) | 843 | struct class_device * class_device_get(struct class_device *class_dev) |
886 | { | 844 | { |
887 | if (class_dev) | 845 | if (class_dev) |