[OpenWrt-Devel] [PATCH netifd 3/3] system-linux: Replace device_get by device_find where appropriate
Hans Dedecker
dedeckeh at gmail.com
Mon Jun 6 06:03:43 EDT 2016
Replace device_get by device_find so it's clear a device needs to be found present
in the device list.
Signed-off-by: Hans Dedecker <dedeckeh at gmail.com>
---
system-linux.c | 2 +-
ubus.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/system-linux.c b/system-linux.c
index 98acb9d..04f633a 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -549,7 +549,7 @@ handle_hotplug_msg(char *data, int size)
return;
found:
- dev = device_get(interface, false);
+ dev = device_find(interface);
if (!dev)
return;
diff --git a/ubus.c b/ubus.c
index 4184301..198d93b 100644
--- a/ubus.c
+++ b/ubus.c
@@ -290,7 +290,8 @@ netifd_handle_set_state(struct ubus_context *ctx, struct ubus_object *obj,
if (!cur)
return UBUS_STATUS_INVALID_ARGUMENT;
- dev = device_get(blobmsg_data(cur), false);
+ dev = device_find(blobmsg_data(cur));
+
if (!dev)
return UBUS_STATUS_NOT_FOUND;
--
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