projects
/
project
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5bf6467
)
use device_(add|remove)_user when replacing devices
author
Felix Fietkau
<nbd@openwrt.org>
Wed, 5 Oct 2011 14:10:21 +0000
(16:10 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Wed, 5 Oct 2011 14:10:21 +0000
(16:10 +0200)
device.c
patch
|
blob
|
history
diff --git
a/device.c
b/device.c
index
f9ad25a
..
76feb68
100644
(file)
--- 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) {
device_set_present(odev, false);
list_for_each_entry_safe(dep, tmp, &odev->users, list) {
-
list_move_tail(&dep->list, &dev->users
);
- de
p->dev = dev
;
+
device_remove_user(dep
);
+ de
vice_add_user(dep, dev)
;
}
device_free(odev);
}
device_free(odev);