/* 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;
};
/* Notifier for inetaddr addition/deletion events. */
-static struct notifier_block sctp_inetaddr_notifier = {
+struct notifier_block sctp_inetaddr_notifier = {
.notifier_call = sctp_inetaddr_event,
};
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;
}
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;
}
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 "
/* 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);