bm = calloc(1, sizeof(*bm));
bm->bst = bst;
bm->dev.cb = bridge_member_cb;
- add_device_user(&bm->dev, dev);
+ device_add_user(&bm->dev, dev);
list_add(&bm->list, &bst->members);
if (!dev)
return -1;
- add_device_user(&iface->main_dev, dev);
+ device_add_user(&iface->main_dev, dev);
return 0;
}
broadcast_device_event(dev, state ? DEV_EVENT_ADD : DEV_EVENT_REMOVE);
}
-void add_device_user(struct device_user *dep, struct device *dev)
+void device_add_user(struct device_user *dep, struct device *dev)
{
dep->dev = dev;
list_add(&dep->list, &dev->users);
int init_device(struct device *iface, const struct device_type *type, const char *ifname);
void cleanup_device(struct device *iface);
struct device *get_device(const char *name, bool create);
-void add_device_user(struct device_user *dep, struct device *iface);
+void device_add_user(struct device_user *dep, struct device *iface);
void device_remove_user(struct device_user *dep);
void set_device_present(struct device *dev, bool state);
if ((cur = tb[IFACE_ATTR_IFNAME])) {
dev = get_device(blobmsg_data(cur), true);
if (dev)
- add_device_user(&iface->main_dev, dev);
+ device_add_user(&iface->main_dev, dev);
}
return iface;
if (iface->main_dev.dev)
interface_remove_link(iface, NULL);
- add_device_user(&iface->main_dev, dev);
+ device_add_user(&iface->main_dev, dev);
return 0;
}
vldev->id = id;
vldev->dep.cb = vlan_dev_cb;
- add_device_user(&vldev->dep, dev);
+ device_add_user(&vldev->dep, dev);
return &vldev->dev;
}