[LEDE-DEV] [PATCH netifd 2/2] device: Use device_find for better readibility in device_create

Hans Dedecker dedeckeh at gmail.com
Mon Nov 21 06:05:08 PST 2016


Use device_find in device_create so it's clear a device lookup
is being done in the device list.

Signed-off-by: Hans Dedecker <dedeckeh at gmail.com>
---
 device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/device.c b/device.c
index 82596e4..3c57a02 100644
--- a/device.c
+++ b/device.c
@@ -937,7 +937,7 @@ device_create(const char *name, struct device_type *type,
 	struct device *odev = NULL, *dev;
 	enum dev_change_type change;
 
-	odev = device_get(name, false);
+	odev = device_find(name);
 	if (odev) {
 		odev->current_config = true;
 		change = device_apply_config(odev, type, config);
-- 
1.9.1




More information about the Lede-dev mailing list