-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);
+extern const struct uci_blob_param_list device_attr_list;
+extern const struct device_type simple_device_type;
+extern const struct device_type bridge_device_type;
+extern const struct device_type tunnel_device_type;
+extern const struct device_type macvlan_device_type;
+extern const struct device_type vlandev_device_type;
+
+void device_lock(void);
+void device_unlock(void);
+
+struct device *device_create(const char *name, const struct device_type *type,
+ struct blob_attr *config);
+void device_init_settings(struct device *dev, struct blob_attr **tb);
+void device_init_pending(void);
+
+enum dev_change_type
+device_apply_config(struct device *dev, const struct device_type *type,
+ struct blob_attr *config);
+
+void device_reset_config(void);
+void device_reset_old(void);
+void device_set_default_ps(bool state);
+
+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, int create);
+void device_add_user(struct device_user *dep, struct device *iface);