summaryrefslogtreecommitdiff
path: root/vlandev.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 /vlandev.c
parentfe6ad84c7120a1000c9dcd3cabdc6249b36414a6 (diff)
downloadnetifd-92889eca62fcd5b72d7c54101c35ff6d6d477c40.tar.gz
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 'vlandev.c')
-rw-r--r--vlandev.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/vlandev.c b/vlandev.c
index b8f7a25..becaed8 100644
--- a/vlandev.c
+++ b/vlandev.c
@@ -241,7 +241,7 @@ vlandev_create(const char *name, struct device_type *devtype,
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,
@@ -250,3 +250,8 @@ struct device_type vlandev_device_type = {
.free = vlandev_free,
.dump_info = vlandev_dump_info,
};
+
+static void __init vlandev_device_type_init(void)
+{
+ device_type_add(&vlandev_device_type);
+}