[OpenWrt-Devel] [PATCH 3/4] netifd: Remove obsolete device_set_present in device_replace
Hans Dedecker
dedeckeh at gmail.com
Tue Aug 4 10:22:44 EDT 2015
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 at gmail.com>
---
device.c | 6 +-----
1 file changed, 1 insertion(+), 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
--
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list