提交 e6d473e6 编写于 作者: S stephen hemminger 提交者: David S. Miller

net: make net_class ro_after_init

The net_class in sysfs is only modified on init.
Signed-off-by: NStephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b793dc5c
...@@ -1511,7 +1511,7 @@ static const void *net_namespace(struct device *d) ...@@ -1511,7 +1511,7 @@ static const void *net_namespace(struct device *d)
return dev_net(dev); return dev_net(dev);
} }
static struct class net_class = { static struct class net_class __ro_after_init = {
.name = "net", .name = "net",
.dev_release = netdev_release, .dev_release = netdev_release,
.dev_groups = net_class_groups, .dev_groups = net_class_groups,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册