reorder function
[project/netifd.git] / device.h
index 913f3a9..733763f 100644 (file)
--- 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 add_device_user(struct device_user *dep, struct device *iface);
-void remove_device_user(struct device_user *dep);
+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);