X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=device.h;h=733763f753f82619423059df8de95e7e9363cd5f;hp=dd2b5edf35abc4e759530ed02894fee473980827;hb=a7d77cbb91d64cbd36808f09e93e21a866844fd4;hpb=8c7ee052813ae68490b230c657a4a36700654ce5 diff --git a/device.h b/device.h index dd2b5ed..733763f 100644 --- a/device.h +++ b/device.h @@ -119,28 +119,28 @@ struct device_hotplug_ops { int (*del)(struct device *main, struct device *member); }; -static inline void -device_free(struct device *dev) -{ - dev->type->free(dev); -} - extern const struct config_param_list device_attr_list; struct device *device_create(struct blob_attr *attr, struct uci_section *s); -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); -struct device *get_device(const char *name, bool create); +void device_init_virtual(struct device *dev, const struct device_type *type, const char *name); +int device_init(struct device *iface, const struct device_type *type, const char *ifname); +void device_cleanup(struct device *iface); +struct device *device_get(const char *name, bool create); 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); -int claim_device(struct device *dev); -void release_device(struct device *dev); +void device_set_present(struct device *dev, bool state); +int device_claim(struct device *dev); +void device_release(struct device *dev); int check_device_state(struct device *dev); +static inline void +device_free(struct device *dev) +{ + dev->type->free(dev); +} + void device_free_all(void); struct device *get_vlan_device_chain(const char *ifname, bool create);