aboutsummaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2008-06-10 11:09:08 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2008-07-21 21:55:01 -0700
commit36ce6dad6e3cb3f050ed41e0beac0070d2062b25 (patch)
tree91c89c903b06dc8b76e66e7b2341bcd6085e81d0 /drivers/base
parent0ad1d6f37cc3bb234c6e7ae30e40d1d40b9aa258 (diff)
driver core: Suppress sysfs warnings for device_rename().
driver core: Suppress sysfs warnings for device_rename(). Renaming network devices to an already existing name is not something we want sysfs to print a scary warning for, since the callers can deal with this correctly. So let's introduce sysfs_create_link_nowarn() which gets rid of the common warning. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/core.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index c05b1159023..7d5c63c81a5 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1345,8 +1345,9 @@ int device_rename(struct device *dev, char *new_name)
if (old_class_name) {
new_class_name = make_class_name(dev->class->name, &dev->kobj);
if (new_class_name) {
- error = sysfs_create_link(&dev->parent->kobj,
- &dev->kobj, new_class_name);
+ error = sysfs_create_link_nowarn(&dev->parent->kobj,
+ &dev->kobj,
+ new_class_name);
if (error)
goto out;
sysfs_remove_link(&dev->parent->kobj, old_class_name);
@@ -1354,8 +1355,8 @@ int device_rename(struct device *dev, char *new_name)
}
#else
if (dev->class) {
- error = sysfs_create_link(&dev->class->p->class_subsys.kobj,
- &dev->kobj, dev->bus_id);
+ error = sysfs_create_link_nowarn(&dev->class->p->class_subsys.kobj,
+ &dev->kobj, dev->bus_id);
if (error)
goto out;
sysfs_remove_link(&dev->class->p->class_subsys.kobj,