fix device_lock
authorFelix Fietkau <nbd@openwrt.org>
Wed, 19 Oct 2011 15:32:01 +0000 (17:32 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 19 Oct 2011 15:32:01 +0000 (17:32 +0200)
device.c

index 0a33f67..717993a 100644 (file)
--- a/device.c
+++ b/device.c
@@ -403,7 +403,7 @@ void device_add_user(struct device_user *dep, struct device *dev)
 static void
 __device_free_unused(struct device *dev)
 {
-       if (!list_empty(&dev->users) || dev->current_config || config_init)
+       if (!list_empty(&dev->users) || dev->current_config || __devlock)
                return;
 
        device_free(dev);