net: make net_class ro_after_init

The net_class in sysfs is only modified on init.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
stephen hemminger 2017-08-18 13:46:21 -07:00 committed by David S. Miller
parent b793dc5c6e
commit e6d473e635
1 changed files with 1 additions and 1 deletions

View File

@ -1511,7 +1511,7 @@ static const void *net_namespace(struct device *d)
return dev_net(dev);
}
static struct class net_class = {
static struct class net_class __ro_after_init = {
.name = "net",
.dev_release = netdev_release,
.dev_groups = net_class_groups,