projects
/
project
/
netifd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
system-linux: set the device present state in system_if_check()
[project/netifd.git]
/
device.c
diff --git
a/device.c
b/device.c
index
ac0954d
..
5b27ce0
100644
(file)
--- a/
device.c
+++ b/
device.c
@@
-292,7
+292,7
@@
void device_add_user(struct device_user *dep, struct device *dev)
static void
__device_free_unused(struct device *dev)
{
static void
__device_free_unused(struct device *dev)
{
- if (!list_empty(&dev->users) || dev->current_config)
+ if (!list_empty(&dev->users) || dev->current_config
|| config_init
)
return;
device_free(dev);
return;
device_free(dev);
@@
-424,7
+424,6
@@
device_create(const char *name, const struct device_type *type,
struct device *odev = NULL, *dev;
enum dev_change_type change;
struct device *odev = NULL, *dev;
enum dev_change_type change;
- D(DEVICE, "Create new device '%s' (%s)\n", name, type->name);
config = config_memdup(config);
if (!config)
return NULL;
config = config_memdup(config);
if (!config)
return NULL;
@@
-452,7
+451,8
@@
device_create(const char *name, const struct device_type *type,
device_delete(odev);
break;
}
device_delete(odev);
break;
}
- }
+ } else
+ D(DEVICE, "Create new device '%s' (%s)\n", name, type->name);
dev = type->create(config);
if (!dev)
dev = type->create(config);
if (!dev)