device: Use device_find for better readibility in device_create
authorHans Dedecker <dedeckeh@gmail.com>
Mon, 21 Nov 2016 14:05:08 +0000 (15:05 +0100)
committerFelix Fietkau <nbd@nbd.name>
Tue, 22 Nov 2016 09:45:07 +0000 (10:45 +0100)
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@gmail.com>
device.c

index 82596e4d46df63b486abccc23b95397bcc8f55ff..3c57a02802bd5aed64d9e7854aefa46809b36b31 100644 (file)
--- 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);