diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2008-06-10 05:09:08 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-22 00:55:01 -0400 |
commit | 36ce6dad6e3cb3f050ed41e0beac0070d2062b25 (patch) | |
tree | 91c89c903b06dc8b76e66e7b2341bcd6085e81d0 /drivers/base | |
parent | 0ad1d6f37cc3bb234c6e7ae30e40d1d40b9aa258 (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.c | 9 |
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, |