net: constify net_ns_type_operations
authorstephen hemminger <stephen@networkplumber.org>
Fri, 18 Aug 2017 20:46:22 +0000 (13:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 19 Aug 2017 05:37:27 +0000 (22:37 -0700)
This can be const.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
net/core/net-sysfs.c

index eaa77bd9cb80888c0942b0cf090bc4578248c12f..b0c928598dabada925f4d9e7b7ad30485a9c5bb0 100644 (file)
@@ -4028,7 +4028,7 @@ static inline void netdev_class_remove_file(const struct class_attribute *class_
        netdev_class_remove_file_ns(class_attr, NULL);
 }
 
-extern struct kobj_ns_type_operations net_ns_type_operations;
+extern const struct kobj_ns_type_operations net_ns_type_operations;
 
 const char *netdev_drivername(const struct net_device *dev);
 
index 99061b0a1ebd0f9b823726533f982de6ded17ee4..2de441692f2817d20c6161eb69f846706bb4ebf0 100644 (file)
@@ -1461,7 +1461,7 @@ static const void *net_netlink_ns(struct sock *sk)
        return sock_net(sk);
 }
 
-struct kobj_ns_type_operations net_ns_type_operations = {
+const struct kobj_ns_type_operations net_ns_type_operations = {
        .type = KOBJ_NS_TYPE_NET,
        .current_may_mount = net_current_may_mount,
        .grab_current_ns = net_grab_current_ns,