system-linux: Replace device_get by device_find where appropriate
authorHans Dedecker <dedeckeh@gmail.com>
Mon, 6 Jun 2016 12:58:33 +0000 (14:58 +0200)
committerFelix Fietkau <nbd@nbd.name>
Mon, 6 Jun 2016 13:42:01 +0000 (15:42 +0200)
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@gmail.com>
system-linux.c
ubus.c

index eb785b56395caa03d102276e3973a974719933ee..d868c15debe82b96ff4b572556aa6f98c9da9009 100644 (file)
@@ -548,7 +548,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 41843011c376d26b22a08bb223cac4330537ea0a..74cdf28d93534e36d486358722dc47299cd0053a 100644 (file)
--- a/ubus.c
+++ b/ubus.c
@@ -290,7 +290,7 @@ 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;