diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-26 11:41:30 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-26 11:41:30 -0800 |
commit | a7538a7f87826fb5cacc6959f00dfa9fba6f4b15 (patch) | |
tree | a0fef9252200a78634f0fa4eaa714c7a40e802b9 /drivers/base/class.c | |
parent | 92320cec611d4ed44a9bd635727d61f6caa669a7 (diff) | |
parent | dfff0a0671baf4e69fc676bf8150635407548288 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6:
Revert "Driver core: let request_module() send a /sys/modules/kmod/-uevent"
Driver core: fix error by cleanup up symlinks properly
make kernel/kmod.c:kmod_mk static
power management: fix struct layout and docs
power management: no valid states w/o pm_ops
Driver core: more fallout from class_device changes for pcmcia
sysfs: move struct sysfs_dirent to private header
driver core: refcounting fix
Driver core: remove class_device_rename
Diffstat (limited to 'drivers/base/class.c')
-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 1417e5cd4c6..d5968128be2 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) class_device_unregister(class_dev); } -int class_device_rename(struct class_device *class_dev, char *new_name) -{ - int error = 0; - char *old_class_name = NULL, *new_class_name = NULL; - - class_dev = class_device_get(class_dev); - if (!class_dev) - return -EINVAL; - - pr_debug("CLASS: renaming '%s' to '%s'\n", class_dev->class_id, - new_name); - -#ifdef CONFIG_SYSFS_DEPRECATED - if (class_dev->dev) - old_class_name = make_class_name(class_dev->class->name, - &class_dev->kobj); -#endif - - strlcpy(class_dev->class_id, new_name, KOBJ_NAME_LEN); - - error = kobject_rename(&class_dev->kobj, new_name); - -#ifdef CONFIG_SYSFS_DEPRECATED - if (class_dev->dev) { - new_class_name = make_class_name(class_dev->class->name, - &class_dev->kobj); - if (new_class_name) - sysfs_create_link(&class_dev->dev->kobj, - &class_dev->kobj, new_class_name); - if (old_class_name) - sysfs_remove_link(&class_dev->dev->kobj, - old_class_name); - } -#endif - class_device_put(class_dev); - - kfree(old_class_name); - kfree(new_class_name); - - return error; -} - struct class_device * class_device_get(struct class_device *class_dev) { if (class_dev) |