mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/ixgbe/ixgbe_main.c include/net/mac80211.h net/phonet/af_phonet.c
This commit is contained in:
commit
6ab33d5171
120 changed files with 778 additions and 679 deletions
|
|
@ -33,8 +33,25 @@
|
|||
#include <net/phonet/phonet.h>
|
||||
#include <net/phonet/pn_dev.h>
|
||||
|
||||
static struct net_proto_family phonet_proto_family;
|
||||
static struct phonet_protocol *phonet_proto_get(int protocol);
|
||||
/* Transport protocol registration */
|
||||
static struct phonet_protocol *proto_tab[PHONET_NPROTO] __read_mostly;
|
||||
static DEFINE_SPINLOCK(proto_tab_lock);
|
||||
|
||||
static struct phonet_protocol *phonet_proto_get(int protocol)
|
||||
{
|
||||
struct phonet_protocol *pp;
|
||||
|
||||
if (protocol >= PHONET_NPROTO)
|
||||
return NULL;
|
||||
|
||||
spin_lock(&proto_tab_lock);
|
||||
pp = proto_tab[protocol];
|
||||
if (pp && !try_module_get(pp->prot->owner))
|
||||
pp = NULL;
|
||||
spin_unlock(&proto_tab_lock);
|
||||
|
||||
return pp;
|
||||
}
|
||||
|
||||
static inline void phonet_proto_put(struct phonet_protocol *pp)
|
||||
{
|
||||
|
|
@ -379,10 +396,6 @@ static struct packet_type phonet_packet_type = {
|
|||
.func = phonet_rcv,
|
||||
};
|
||||
|
||||
/* Transport protocol registration */
|
||||
static struct phonet_protocol *proto_tab[PHONET_NPROTO] __read_mostly;
|
||||
static DEFINE_SPINLOCK(proto_tab_lock);
|
||||
|
||||
int __init_or_module phonet_proto_register(int protocol,
|
||||
struct phonet_protocol *pp)
|
||||
{
|
||||
|
|
@ -416,22 +429,6 @@ void phonet_proto_unregister(int protocol, struct phonet_protocol *pp)
|
|||
}
|
||||
EXPORT_SYMBOL(phonet_proto_unregister);
|
||||
|
||||
static struct phonet_protocol *phonet_proto_get(int protocol)
|
||||
{
|
||||
struct phonet_protocol *pp;
|
||||
|
||||
if (protocol >= PHONET_NPROTO)
|
||||
return NULL;
|
||||
|
||||
spin_lock(&proto_tab_lock);
|
||||
pp = proto_tab[protocol];
|
||||
if (pp && !try_module_get(pp->prot->owner))
|
||||
pp = NULL;
|
||||
spin_unlock(&proto_tab_lock);
|
||||
|
||||
return pp;
|
||||
}
|
||||
|
||||
/* Module registration */
|
||||
static int __init phonet_init(void)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue