summaryrefslogtreecommitdiffhomepage
path: root/device.c
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2016-09-23 15:08:17 +0200
committerFelix Fietkau <nbd@nbd.name>2016-09-26 11:51:19 +0200
commit92889eca62fcd5b72d7c54101c35ff6d6d477c40 (patch)
tree0ca2aba1b6bbc24035df147bf51dc4b131c69eae /device.c
parentfe6ad84c7120a1000c9dcd3cabdc6249b36414a6 (diff)
device: Move the different device type registrations to the device type file
While at it; make device_types static if only used in the device type file Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'device.c')
-rw-r--r--device.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/device.c b/device.c
index a7d18af..e17df13 100644
--- a/device.c
+++ b/device.c
@@ -82,16 +82,6 @@ int device_type_add(struct device_type *devtype)
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
*/
@@ -1065,3 +1055,8 @@ device_dump_status(struct blob_buf *b, struct device *dev)
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);
+}