aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/net-sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/net-sysfs.c')
-rw-r--r--net/core/net-sysfs.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 4e7b847347f7..90e2177af081 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -449,7 +449,6 @@ int netdev_register_kobject(struct net_device *net)
449 struct device *dev = &(net->dev); 449 struct device *dev = &(net->dev);
450 struct attribute_group **groups = net->sysfs_groups; 450 struct attribute_group **groups = net->sysfs_groups;
451 451
452 device_initialize(dev);
453 dev->class = &net_class; 452 dev->class = &net_class;
454 dev->platform_data = net; 453 dev->platform_data = net;
455 dev->groups = groups; 454 dev->groups = groups;
@@ -470,6 +469,12 @@ int netdev_register_kobject(struct net_device *net)
470 return device_add(dev); 469 return device_add(dev);
471} 470}
472 471
472void netdev_initialize_kobject(struct net_device *net)
473{
474 struct device *device = &(net->dev);
475 device_initialize(device);
476}
477
473int netdev_kobject_init(void) 478int netdev_kobject_init(void)
474{ 479{
475 return class_register(&net_class); 480 return class_register(&net_class);