diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2015-08-04 16:22:44 +0200 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2015-08-25 08:23:38 +0200 |
commit | 0b32f960b8b073fdf983430723d675a31a110784 (patch) | |
tree | f541411319d952019938234761abff9936143bd8 /device.c | |
parent | 9f3e8eae623da44eea2453bf2e63d5f1cba9e923 (diff) |
netifd: Remove obsolete device_set_present in device_replace
New device does not need to be set present as device_check_state called via device_init
sets the device present after probing the kernel device
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'device.c')
-rw-r--r-- | device.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -702,10 +702,9 @@ static void device_replace(struct device *dev, struct device *odev) { struct device_user *dep, *tmp; - bool present = odev->present; __devlock++; - if (present) + if (odev->present) device_set_present(odev, false); list_for_each_entry_safe(dep, tmp, &odev->users.list, list.list) { @@ -717,9 +716,6 @@ device_replace(struct device *dev, struct device *odev) __devlock--; device_free(odev); - - if (present) - device_set_present(dev, true); } void |