Searched refs:proto_tab (Results 1 – 6 of 6) sorted by relevance
/kernel/linux/linux-4.19/net/nfc/ |
D | af_nfc.c | 28 static const struct nfc_protocol *proto_tab[NFC_SOCKPROTO_MAX]; variable 42 if (proto_tab[proto] && try_module_get(proto_tab[proto]->owner)) { in nfc_sock_create() 43 rc = proto_tab[proto]->create(net, sock, proto_tab[proto], kern); in nfc_sock_create() 44 module_put(proto_tab[proto]->owner); in nfc_sock_create() 69 if (proto_tab[nfc_proto->id]) in nfc_proto_register() 72 proto_tab[nfc_proto->id] = nfc_proto; in nfc_proto_register() 82 proto_tab[nfc_proto->id] = NULL; in nfc_proto_unregister()
|
/kernel/linux/linux-5.10/net/nfc/ |
D | af_nfc.c | 16 static const struct nfc_protocol *proto_tab[NFC_SOCKPROTO_MAX]; variable 30 if (proto_tab[proto] && try_module_get(proto_tab[proto]->owner)) { in nfc_sock_create() 31 rc = proto_tab[proto]->create(net, sock, proto_tab[proto], kern); in nfc_sock_create() 32 module_put(proto_tab[proto]->owner); in nfc_sock_create() 57 if (proto_tab[nfc_proto->id]) in nfc_proto_register() 60 proto_tab[nfc_proto->id] = nfc_proto; in nfc_proto_register() 73 proto_tab[nfc_proto->id] = NULL; in nfc_proto_unregister()
|
/kernel/linux/linux-5.10/net/phonet/ |
D | af_phonet.c | 25 static const struct phonet_protocol *proto_tab[PHONET_NPROTO] __read_mostly; variable 35 pp = rcu_dereference(proto_tab[protocol]); in phonet_proto_get() 472 if (proto_tab[protocol]) in phonet_proto_register() 475 rcu_assign_pointer(proto_tab[protocol], pp); in phonet_proto_register() 486 BUG_ON(proto_tab[protocol] != pp); in phonet_proto_unregister() 487 RCU_INIT_POINTER(proto_tab[protocol], NULL); in phonet_proto_unregister()
|
/kernel/linux/linux-4.19/net/phonet/ |
D | af_phonet.c | 38 static const struct phonet_protocol *proto_tab[PHONET_NPROTO] __read_mostly; variable 48 pp = rcu_dereference(proto_tab[protocol]); in phonet_proto_get() 485 if (proto_tab[protocol]) in phonet_proto_register() 488 rcu_assign_pointer(proto_tab[protocol], pp); in phonet_proto_register() 499 BUG_ON(proto_tab[protocol] != pp); in phonet_proto_unregister() 500 RCU_INIT_POINTER(proto_tab[protocol], NULL); in phonet_proto_unregister()
|
/kernel/linux/linux-5.10/net/can/ |
D | af_can.c | 82 static const struct can_proto __rcu *proto_tab[CAN_NPROTO] __read_mostly; variable 101 cp = rcu_dereference(proto_tab[protocol]); in can_get_proto() 758 if (rcu_access_pointer(proto_tab[proto])) { in can_proto_register() 762 RCU_INIT_POINTER(proto_tab[proto], cp); in can_proto_register() 783 BUG_ON(rcu_access_pointer(proto_tab[proto]) != cp); in can_proto_unregister() 784 RCU_INIT_POINTER(proto_tab[proto], NULL); in can_proto_unregister()
|
/kernel/linux/linux-4.19/net/can/ |
D | af_can.c | 81 static const struct can_proto __rcu *proto_tab[CAN_NPROTO] __read_mostly; variable 116 cp = rcu_dereference(proto_tab[protocol]); in can_get_proto() 784 if (rcu_access_pointer(proto_tab[proto])) { in can_proto_register() 788 RCU_INIT_POINTER(proto_tab[proto], cp); in can_proto_register() 808 BUG_ON(rcu_access_pointer(proto_tab[proto]) != cp); in can_proto_unregister() 809 RCU_INIT_POINTER(proto_tab[proto], NULL); in can_proto_unregister()
|