projects
/
project
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
814e094
)
vlan: set the name of vlan devices earlier
author
Nathan Hintz
<
[email protected]
>
Tue, 24 Sep 2013 18:21:02 +0000
(11:21 -0700)
committer
Felix Fietkau
<
[email protected]
>
Wed, 25 Sep 2013 06:24:15 +0000
(08:24 +0200)
Set the device name earlier so that the logging done inside of
'device_init_virtual' can print the name of the device being
initialized (instead of an empty string).
Signed-off-by: Nathan Hintz <
[email protected]
>
vlan.c
patch
|
blob
|
history
diff --git
a/vlan.c
b/vlan.c
index 45896751d39241d240b2596d85dbeff8b1373303..f70420a257f71b77d5b6e95b1051a2a9a01b300a 100644
(file)
--- a/
vlan.c
+++ b/
vlan.c
@@
-115,15
+115,15
@@
static struct device *get_vlan_device(struct device *dev, int id, bool create)
vldev = calloc(1, sizeof(*vldev));
+ vldev->id = id;
+ vlan_dev_set_name(vldev, dev);
+
device_init_virtual(&vldev->dev, &vlan_type, NULL);
vldev->dev.default_config = true;
vldev->set_state = vldev->dev.set_state;
vldev->dev.set_state = vlan_set_device_state;
- vldev->id = id;
- vlan_dev_set_name(vldev, dev);
-
vldev->dep.cb = vlan_dev_cb;
device_add_user(&vldev->dep, dev);