summaryrefslogtreecommitdiffhomepage
path: root/device.c
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2014-07-30 10:56:29 +0000
committerSteven Barth <steven@midlink.org>2014-07-30 15:21:55 +0200
commitc09e944416d76ed162efc55483f987cd537c2c8b (patch)
tree5def42f96f840b71e1c5cf7c491e5db08cdf2180 /device.c
parent4bf89afc22b43d5bd155d32d3998348a77179c1a (diff)
netifd: Set device down based on being a non external device in device_release
Line up the device state manipulation by checking the external device parameter consistent and not the hotplug device parameter Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'device.c')
-rw-r--r--device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/device.c b/device.c
index b16f156..26b020f 100644
--- a/device.c
+++ b/device.c
@@ -254,7 +254,7 @@ void device_release(struct device_user *dep)
return;
device_broadcast_event(dev, DEV_EVENT_TEARDOWN);
- if (!dep->hotplug)
+ if (!dev->external)
dev->set_state(dev, false);
device_broadcast_event(dev, DEV_EVENT_DOWN);
}