diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-03-03 20:55:03 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2012-03-03 20:55:03 +0100 |
commit | f5f78c1eca1fe2df04dae56a4d9f024533066b29 (patch) | |
tree | d224a80554f4ee56a9a4db6547ba808de2d0e494 /device.c | |
parent | aff73720b65ca33a487c813f27644f8d5aea0df1 (diff) |
preserve interface main hotplug device on reload
Diffstat (limited to 'device.c')
-rw-r--r-- | device.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -465,6 +465,9 @@ device_set_disabled(struct device *dev, bool value) void device_add_user(struct device_user *dep, struct device *dev) { + if (dep->dev) + device_remove_user(dep); + dep->dev = dev; list_add_tail(&dep->list, &dev->users); if (dep->cb && dev->present) { |