net: phonet: mark header_ops as const
authorLin Zhang <xiaolou4617@gmail.com>
Thu, 5 Oct 2017 17:37:29 +0000 (01:37 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 7 Oct 2017 22:15:08 +0000 (23:15 +0100)
Signed-off-by: Lin Zhang <xiaolou4617@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/if_phonet.h
net/phonet/af_phonet.c

index bbcdb0a..a118ee4 100644 (file)
@@ -10,5 +10,5 @@
 
 #include <uapi/linux/if_phonet.h>
 
-extern struct header_ops phonet_header_ops;
+extern const struct header_ops phonet_header_ops;
 #endif
index f925753..b12142e 100644 (file)
@@ -149,7 +149,7 @@ static int pn_header_parse(const struct sk_buff *skb, unsigned char *haddr)
        return 1;
 }
 
-struct header_ops phonet_header_ops = {
+const struct header_ops phonet_header_ops = {
        .create = pn_header_create,
        .parse = pn_header_parse,
 };