X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=device.h;h=bbb78d8712276fd43d6d720bd7f69d4761c8f8f2;hp=bfd044ae6eab1231d18d340bb4a50be1c6f8cdc2;hb=d3a4844047c7b3c62511a9836a81703b5ee70fc0;hpb=c1692fdcf48ad32217354d5206af31115e562306;ds=sidebyside diff --git a/device.h b/device.h index bfd044a..bbb78d8 100644 --- a/device.h +++ b/device.h @@ -82,6 +82,12 @@ struct device_hotplug_ops { int (*del)(struct device *main, struct device *member); }; +static inline void +free_device(struct device *dev) +{ + dev->type->free(dev); +} + void init_virtual_device(struct device *dev, const struct device_type *type, const char *name); int init_device(struct device *iface, const struct device_type *type, const char *ifname); void cleanup_device(struct device *iface); @@ -94,6 +100,8 @@ int claim_device(struct device *dev); void release_device(struct device *dev); int check_device_state(struct device *dev); +void cleanup_devices(void); + struct device *get_vlan_device_chain(const char *ifname, bool create); struct device *bridge_create(const char *name, struct uci_section *s);