void device_add_user(struct device_user *dep, struct device *dev)
{
dep->dev = dev;
- list_add(&dep->list, &dev->users);
+ list_add_tail(&dep->list, &dev->users);
if (dep->cb && dev->present) {
dep->cb(dep, DEV_EVENT_ADD);
if (dev->active)
else
family = AF_INET;
- list_add(&addr->list, &iface->address);
+ list_add_tail(&addr->list, &iface->address);
return system_add_address(iface->l3_iface->dev, addr);
}
int interface_add_route(struct interface *iface, struct device_route *route)
{
- list_add(&route->list, &iface->routes);
+ list_add_tail(&route->list, &iface->routes);
return system_add_route(iface->l3_iface->dev, route);
}
iface->main_dev.cb = interface_cb;
iface->l3_iface = &iface->main_dev;
strncpy(iface->name, name, sizeof(iface->name) - 1);
- list_add(&iface->list, &interfaces);
+ list_add_tail(&iface->list, &interfaces);
INIT_LIST_HEAD(&iface->errors);
INIT_LIST_HEAD(&iface->address);
INIT_LIST_HEAD(&iface->routes);