summaryrefslogtreecommitdiffhomepage
path: root/device.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-10-05 16:10:21 +0200
committerFelix Fietkau <nbd@openwrt.org>2011-10-05 16:10:21 +0200
commit69485f59ad87c5f3a706248b62c4205e9e659d8b (patch)
tree0454262c46856a1e49b34615c24a4518322b816d /device.c
parent5bf6467af8d59d0b0794413204ad385367221e22 (diff)
use device_(add|remove)_user when replacing devices
Diffstat (limited to 'device.c')
-rw-r--r--device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/device.c b/device.c
index f9ad25a..76feb68 100644
--- a/device.c
+++ b/device.c
@@ -337,8 +337,8 @@ device_replace(struct device *dev, struct device *odev)
device_set_present(odev, false);
list_for_each_entry_safe(dep, tmp, &odev->users, list) {
- list_move_tail(&dep->list, &dev->users);
- dep->dev = dev;
+ device_remove_user(dep);
+ device_add_user(dep, dev);
}
device_free(odev);