aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
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 c05b1159023e..7d5c63c81a59 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1345,8 +1345,9 @@ int device_rename(struct device *dev, char *new_name)
1345 if (old_class_name) { 1345 if (old_class_name) {
1346 new_class_name = make_class_name(dev->class->name, &dev->kobj); 1346 new_class_name = make_class_name(dev->class->name, &dev->kobj);
1347 if (new_class_name) { 1347 if (new_class_name) {
1348 error = sysfs_create_link(&dev->parent->kobj, 1348 error = sysfs_create_link_nowarn(&dev->parent->kobj,
1349 &dev->kobj, new_class_name); 1349 &dev->kobj,
1350 new_class_name);
1350 if (error) 1351 if (error)
1351 goto out; 1352 goto out;
1352 sysfs_remove_link(&dev->parent->kobj, old_class_name); 1353 sysfs_remove_link(&dev->parent->kobj, old_class_name);
@@ -1354,8 +1355,8 @@ int device_rename(struct device *dev, char *new_name)
1354 } 1355 }
1355#else 1356#else
1356 if (dev->class) { 1357 if (dev->class) {
1357 error = sysfs_create_link(&dev->class->p->class_subsys.kobj, 1358 error = sysfs_create_link_nowarn(&dev->class->p->class_subsys.kobj,
1358 &dev->kobj, dev->bus_id); 1359 &dev->kobj, dev->bus_id);
1359 if (error) 1360 if (error)
1360 goto out; 1361 goto out;
1361 sysfs_remove_link(&dev->class->p->class_subsys.kobj, 1362 sysfs_remove_link(&dev->class->p->class_subsys.kobj,