char name[];
};
-static struct device_type alias_device_type;
-
static void alias_set_device(struct alias_device *alias, struct device *dev)
{
if (dev == alias->dep.dev) {
return dev;
}
+
+static void __init bridge_device_type_init(void)
+{
+ device_type_add(&bridge_device_type);
+}
return 0;
}
-/* initialize device type list and add known types */
-static void __init devtypes_init(void)
-{
- device_type_add(&simple_device_type);
- device_type_add(&bridge_device_type);
- device_type_add(&tunnel_device_type);
- device_type_add(&macvlan_device_type);
- device_type_add(&vlandev_device_type);
-}
-
/* Retrieve the device type for the given name. If 'bridge' is true, the type
* must have bridge capabilities
*/
system_if_dump_stats(dev, b);
blobmsg_close_table(b, s);
}
+
+static void __init simple_device_type_init(void)
+{
+ device_type_add(&simple_device_type);
+}
extern struct device_type simple_device_type;
extern struct device_type bridge_device_type;
extern struct device_type tunnel_device_type;
-extern struct device_type macvlan_device_type;
-extern struct device_type vlandev_device_type;
void device_lock(void);
void device_unlock(void);
return dev;
}
-struct device_type macvlan_device_type = {
+static struct device_type macvlan_device_type = {
.name = "MAC VLAN",
.config_params = &macvlan_attr_list,
.create = macvlan_create,
.free = macvlan_free,
.dump_info = macvlan_dump_info,
};
+
+static void __init macvlan_device_type_init(void)
+{
+ device_type_add(&macvlan_device_type);
+}
.free = tunnel_free,
};
-
+static void __init tunnel_device_type_init(void)
+{
+ device_type_add(&tunnel_device_type);
+}
return dev;
}
-struct device_type vlandev_device_type = {
+static struct device_type vlandev_device_type = {
.name = "VLANDEV",
.config_params = &vlandev_attr_list,
.create = vlandev_create,
.free = vlandev_free,
.dump_info = vlandev_dump_info,
};
+
+static void __init vlandev_device_type_init(void)
+{
+ device_type_add(&vlandev_device_type);
+}