diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2014-01-05 19:20:11 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-05 20:27:54 -0500 |
commit | a48d4bb0b08fa621439bfcc32ad2f4c4e98decfc (patch) | |
tree | 102b8426fef5285cf8f71e3714efe2831d15a071 /net/core/net-sysfs.c | |
parent | 855404efae0d449cc491978d54ea5d117a3cb271 (diff) |
net: netdev_kobject_init: annotate with __init
netdev_kobject_init() is only being called from __init context,
that is, net_dev_init(), so annotate it with __init as well, thus
the kernel can take this as a hint that the function is used only
during the initialization phase and free up used memory resources
after its invocation.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/net-sysfs.c')
-rw-r--r-- | net/core/net-sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 1a7b7b1df0d1..49843bf7e43e 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c | |||
@@ -1358,7 +1358,7 @@ void netdev_class_remove_file_ns(struct class_attribute *class_attr, | |||
1358 | } | 1358 | } |
1359 | EXPORT_SYMBOL(netdev_class_remove_file_ns); | 1359 | EXPORT_SYMBOL(netdev_class_remove_file_ns); |
1360 | 1360 | ||
1361 | int netdev_kobject_init(void) | 1361 | int __init netdev_kobject_init(void) |
1362 | { | 1362 | { |
1363 | kobj_ns_type_register(&net_ns_type_operations); | 1363 | kobj_ns_type_register(&net_ns_type_operations); |
1364 | return class_register(&net_class); | 1364 | return class_register(&net_class); |