diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2006-11-22 11:49:39 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-12-01 17:52:02 -0500 |
commit | acf02d23b96efa92e7cff05987122ceeb37dd075 (patch) | |
tree | 70db884d9e55e9737d311110410c6155e793f1b4 /drivers/base | |
parent | 8a82472f86bf693b8e91ed56c9ca4f62fbbdcfa3 (diff) |
driver core: Use klist_remove() in device_move()
As pointed out by Alan Stern, device_move needs to use klist_remove which waits
until removal is complete.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index e4eaf46c4d93..e4b530ef757d 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
@@ -1022,7 +1022,7 @@ int device_move(struct device *dev, struct device *new_parent) | |||
1022 | old_parent = dev->parent; | 1022 | old_parent = dev->parent; |
1023 | dev->parent = new_parent; | 1023 | dev->parent = new_parent; |
1024 | if (old_parent) | 1024 | if (old_parent) |
1025 | klist_del(&dev->knode_parent); | 1025 | klist_remove(&dev->knode_parent); |
1026 | klist_add_tail(&dev->knode_parent, &new_parent->klist_children); | 1026 | klist_add_tail(&dev->knode_parent, &new_parent->klist_children); |
1027 | if (!dev->class) | 1027 | if (!dev->class) |
1028 | goto out_put; | 1028 | goto out_put; |
@@ -1031,7 +1031,7 @@ int device_move(struct device *dev, struct device *new_parent) | |||
1031 | /* We ignore errors on cleanup since we're hosed anyway... */ | 1031 | /* We ignore errors on cleanup since we're hosed anyway... */ |
1032 | device_move_class_links(dev, new_parent, old_parent); | 1032 | device_move_class_links(dev, new_parent, old_parent); |
1033 | if (!kobject_move(&dev->kobj, &old_parent->kobj)) { | 1033 | if (!kobject_move(&dev->kobj, &old_parent->kobj)) { |
1034 | klist_del(&dev->knode_parent); | 1034 | klist_remove(&dev->knode_parent); |
1035 | if (old_parent) | 1035 | if (old_parent) |
1036 | klist_add_tail(&dev->knode_parent, | 1036 | klist_add_tail(&dev->knode_parent, |
1037 | &old_parent->klist_children); | 1037 | &old_parent->klist_children); |