X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fsctp%2Fprotocol.c;h=191682be45f8e4fc400ec69d80641c968682bc94;hb=9e1bf581d67d87a1d7fc0ea500729e3a03643a26;hp=1f693e954621f84e685579dd3082d8268058b27e;hpb=8d40237c730b8be87c1b80a5d96b9c603fefa829;p=linux-2.6.git diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 1f693e954..191682be4 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c @@ -622,8 +622,8 @@ static void sctp_v4_seq_dump_addr(struct seq_file *seq, union sctp_addr *addr) /* Event handler for inet address addition/deletion events. * Basically, whenever there is an event, we re-build our local address list. */ -int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev, - void *ptr) +static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev, + void *ptr) { unsigned long flags; @@ -824,7 +824,7 @@ static struct sctp_pf sctp_pf_inet = { }; /* Notifier for inetaddr addition/deletion events. */ -static struct notifier_block sctp_inetaddr_notifier = { +struct notifier_block sctp_inetaddr_notifier = { .notifier_call = sctp_inetaddr_event, }; @@ -1084,7 +1084,7 @@ __init int sctp_init(void) goto err_ahash_alloc; } for (i = 0; i < sctp_assoc_hashsize; i++) { - rwlock_init(&sctp_assoc_hashtable[i].lock); + sctp_assoc_hashtable[i].lock = RW_LOCK_UNLOCKED; sctp_assoc_hashtable[i].chain = NULL; } @@ -1098,7 +1098,7 @@ __init int sctp_init(void) goto err_ehash_alloc; } for (i = 0; i < sctp_ep_hashsize; i++) { - rwlock_init(&sctp_ep_hashtable[i].lock); + sctp_ep_hashtable[i].lock = RW_LOCK_UNLOCKED; sctp_ep_hashtable[i].chain = NULL; } @@ -1117,11 +1117,11 @@ __init int sctp_init(void) goto err_bhash_alloc; } for (i = 0; i < sctp_port_hashsize; i++) { - spin_lock_init(&sctp_port_hashtable[i].lock); + sctp_port_hashtable[i].lock = SPIN_LOCK_UNLOCKED; sctp_port_hashtable[i].chain = NULL; } - spin_lock_init(&sctp_port_alloc_lock); + sctp_port_alloc_lock = SPIN_LOCK_UNLOCKED; sctp_port_rover = sysctl_local_port_range[0] - 1; printk(KERN_INFO "SCTP: Hash tables configured " @@ -1152,7 +1152,7 @@ __init int sctp_init(void) /* Initialize the local address list. */ INIT_LIST_HEAD(&sctp_local_addr_list); - spin_lock_init(&sctp_local_addr_lock); + sctp_local_addr_lock = SPIN_LOCK_UNLOCKED; /* Register notifier for inet address additions/deletions. */ register_inetaddr_notifier(&sctp_inetaddr_notifier);