net: drop capability from protocol definitions
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / net / can / af_can.c
index 606832115674147be25d49bea7f12ce293b9bc2a..9c0426dc3184cca6739a61db144ac4db9f296b90 100644 (file)
@@ -160,11 +160,6 @@ static int can_create(struct net *net, struct socket *sock, int protocol)
                goto errout;
        }
 
-       if (cp->capability >= 0 && !capable(cp->capability)) {
-               err = -EPERM;
-               goto errout;
-       }
-
        sock->ops = cp->ops;
 
        sk = sk_alloc(net, PF_CAN, GFP_KERNEL, cp->prot);
@@ -842,7 +837,7 @@ static struct packet_type can_packet __read_mostly = {
        .func = can_rcv,
 };
 
-static struct net_proto_family can_family_ops __read_mostly = {
+static const struct net_proto_family can_family_ops = {
        .family = PF_CAN,
        .create = can_create,
        .owner  = THIS_MODULE,