summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2015-08-04 16:22:44 +0200
committerSteven Barth <steven@midlink.org>2015-08-25 08:23:38 +0200
commit0b32f960b8b073fdf983430723d675a31a110784 (patch)
treef541411319d952019938234761abff9936143bd8
parent9f3e8eae623da44eea2453bf2e63d5f1cba9e923 (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>
-rw-r--r--device.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/device.c b/device.c
index 59a57f4..1636611 100644
--- a/device.c
+++ b/device.c
@@ -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