aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2006-06-29 19:57:46 -0400
committerLen Brown <len.brown@intel.com>2006-06-29 19:57:46 -0400
commitd120cfb544ed6161b9d32fb6c4648c471807ee6b (patch)
tree7757ad0198d8df76ff5c60f939a687687c41da00 /net/tipc
parent9dce0e950dbfab4148f35ac6f297d8638cdc63c4 (diff)
parentbf7e8511088963078484132636839b59e25cf14f (diff)
merge linus into release branch
Conflicts: drivers/acpi/acpi_memhotplug.c
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/bcast.c4
-rw-r--r--net/tipc/bearer.c2
-rw-r--r--net/tipc/config.c2
-rw-r--r--net/tipc/dbg.c2
-rw-r--r--net/tipc/handler.c2
-rw-r--r--net/tipc/name_table.c4
-rw-r--r--net/tipc/net.c2
-rw-r--r--net/tipc/node.c2
-rw-r--r--net/tipc/port.c4
-rw-r--r--net/tipc/ref.c4
-rw-r--r--net/tipc/subscr.c2
-rw-r--r--net/tipc/user_reg.c2
12 files changed, 16 insertions, 16 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index 54128040a124..1bb75703f384 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -117,7 +117,7 @@ struct bclink {
117static struct bcbearer *bcbearer = NULL; 117static struct bcbearer *bcbearer = NULL;
118static struct bclink *bclink = NULL; 118static struct bclink *bclink = NULL;
119static struct link *bcl = NULL; 119static struct link *bcl = NULL;
120static spinlock_t bc_lock = SPIN_LOCK_UNLOCKED; 120static DEFINE_SPINLOCK(bc_lock);
121 121
122char tipc_bclink_name[] = "multicast-link"; 122char tipc_bclink_name[] = "multicast-link";
123 123
@@ -796,7 +796,7 @@ int tipc_bclink_init(void)
796 memset(bclink, 0, sizeof(struct bclink)); 796 memset(bclink, 0, sizeof(struct bclink));
797 INIT_LIST_HEAD(&bcl->waiting_ports); 797 INIT_LIST_HEAD(&bcl->waiting_ports);
798 bcl->next_out_no = 1; 798 bcl->next_out_no = 1;
799 bclink->node.lock = SPIN_LOCK_UNLOCKED; 799 spin_lock_init(&bclink->node.lock);
800 bcl->owner = &bclink->node; 800 bcl->owner = &bclink->node;
801 bcl->max_pkt = MAX_PKT_DEFAULT_MCAST; 801 bcl->max_pkt = MAX_PKT_DEFAULT_MCAST;
802 tipc_link_set_queue_limits(bcl, BCLINK_WIN_DEFAULT); 802 tipc_link_set_queue_limits(bcl, BCLINK_WIN_DEFAULT);
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c
index 4fa24b5e8914..7ef17a449cfd 100644
--- a/net/tipc/bearer.c
+++ b/net/tipc/bearer.c
@@ -566,7 +566,7 @@ restart:
566 b_ptr->link_req = tipc_disc_init_link_req(b_ptr, &m_ptr->bcast_addr, 566 b_ptr->link_req = tipc_disc_init_link_req(b_ptr, &m_ptr->bcast_addr,
567 bcast_scope, 2); 567 bcast_scope, 2);
568 } 568 }
569 b_ptr->publ.lock = SPIN_LOCK_UNLOCKED; 569 spin_lock_init(&b_ptr->publ.lock);
570 write_unlock_bh(&tipc_net_lock); 570 write_unlock_bh(&tipc_net_lock);
571 info("Enabled bearer <%s>, discovery domain %s, priority %u\n", 571 info("Enabled bearer <%s>, discovery domain %s, priority %u\n",
572 name, addr_string_fill(addr_string, bcast_scope), priority); 572 name, addr_string_fill(addr_string, bcast_scope), priority);
diff --git a/net/tipc/config.c b/net/tipc/config.c
index 3ec502fac8c3..285e1bc2d880 100644
--- a/net/tipc/config.c
+++ b/net/tipc/config.c
@@ -63,7 +63,7 @@ struct manager {
63 63
64static struct manager mng = { 0}; 64static struct manager mng = { 0};
65 65
66static spinlock_t config_lock = SPIN_LOCK_UNLOCKED; 66static DEFINE_SPINLOCK(config_lock);
67 67
68static const void *req_tlv_area; /* request message TLV area */ 68static const void *req_tlv_area; /* request message TLV area */
69static int req_tlv_space; /* request message TLV area size */ 69static int req_tlv_space; /* request message TLV area size */
diff --git a/net/tipc/dbg.c b/net/tipc/dbg.c
index 26ef95d5fe38..55130655e1ed 100644
--- a/net/tipc/dbg.c
+++ b/net/tipc/dbg.c
@@ -41,7 +41,7 @@
41#define MAX_STRING 512 41#define MAX_STRING 512
42 42
43static char print_string[MAX_STRING]; 43static char print_string[MAX_STRING];
44static spinlock_t print_lock = SPIN_LOCK_UNLOCKED; 44static DEFINE_SPINLOCK(print_lock);
45 45
46static struct print_buf cons_buf = { NULL, 0, NULL, NULL }; 46static struct print_buf cons_buf = { NULL, 0, NULL, NULL };
47struct print_buf *TIPC_CONS = &cons_buf; 47struct print_buf *TIPC_CONS = &cons_buf;
diff --git a/net/tipc/handler.c b/net/tipc/handler.c
index 966f70a1b608..ae6ddf00a1aa 100644
--- a/net/tipc/handler.c
+++ b/net/tipc/handler.c
@@ -44,7 +44,7 @@ struct queue_item {
44 44
45static kmem_cache_t *tipc_queue_item_cache; 45static kmem_cache_t *tipc_queue_item_cache;
46static struct list_head signal_queue_head; 46static struct list_head signal_queue_head;
47static spinlock_t qitem_lock = SPIN_LOCK_UNLOCKED; 47static DEFINE_SPINLOCK(qitem_lock);
48static int handler_enabled = 0; 48static int handler_enabled = 0;
49 49
50static void process_signal_queue(unsigned long dummy); 50static void process_signal_queue(unsigned long dummy);
diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c
index 38571306aba5..a6926ff07bcc 100644
--- a/net/tipc/name_table.c
+++ b/net/tipc/name_table.c
@@ -101,7 +101,7 @@ struct name_table {
101 101
102static struct name_table table = { NULL } ; 102static struct name_table table = { NULL } ;
103static atomic_t rsv_publ_ok = ATOMIC_INIT(0); 103static atomic_t rsv_publ_ok = ATOMIC_INIT(0);
104rwlock_t tipc_nametbl_lock = RW_LOCK_UNLOCKED; 104DEFINE_RWLOCK(tipc_nametbl_lock);
105 105
106 106
107static int hash(int x) 107static int hash(int x)
@@ -172,7 +172,7 @@ static struct name_seq *tipc_nameseq_create(u32 type, struct hlist_head *seq_hea
172 } 172 }
173 173
174 memset(nseq, 0, sizeof(*nseq)); 174 memset(nseq, 0, sizeof(*nseq));
175 nseq->lock = SPIN_LOCK_UNLOCKED; 175 spin_lock_init(&nseq->lock);
176 nseq->type = type; 176 nseq->type = type;
177 nseq->sseqs = sseq; 177 nseq->sseqs = sseq;
178 dbg("tipc_nameseq_create(): nseq = %p, type %u, ssseqs %p, ff: %u\n", 178 dbg("tipc_nameseq_create(): nseq = %p, type %u, ssseqs %p, ff: %u\n",
diff --git a/net/tipc/net.c b/net/tipc/net.c
index f7c8223ddf7d..e5a359ab4930 100644
--- a/net/tipc/net.c
+++ b/net/tipc/net.c
@@ -115,7 +115,7 @@
115 * - A local spin_lock protecting the queue of subscriber events. 115 * - A local spin_lock protecting the queue of subscriber events.
116*/ 116*/
117 117
118rwlock_t tipc_net_lock = RW_LOCK_UNLOCKED; 118DEFINE_RWLOCK(tipc_net_lock);
119struct network tipc_net = { NULL }; 119struct network tipc_net = { NULL };
120 120
121struct node *tipc_net_select_remote_node(u32 addr, u32 ref) 121struct node *tipc_net_select_remote_node(u32 addr, u32 ref)
diff --git a/net/tipc/node.c b/net/tipc/node.c
index ce9678efa98a..861322b935da 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -77,7 +77,7 @@ struct node *tipc_node_create(u32 addr)
77 77
78 memset(n_ptr, 0, sizeof(*n_ptr)); 78 memset(n_ptr, 0, sizeof(*n_ptr));
79 n_ptr->addr = addr; 79 n_ptr->addr = addr;
80 n_ptr->lock = SPIN_LOCK_UNLOCKED; 80 spin_lock_init(&n_ptr->lock);
81 INIT_LIST_HEAD(&n_ptr->nsub); 81 INIT_LIST_HEAD(&n_ptr->nsub);
82 n_ptr->owner = c_ptr; 82 n_ptr->owner = c_ptr;
83 tipc_cltr_attach_node(c_ptr, n_ptr); 83 tipc_cltr_attach_node(c_ptr, n_ptr);
diff --git a/net/tipc/port.c b/net/tipc/port.c
index 47d97404e3ee..3251c8d8e53c 100644
--- a/net/tipc/port.c
+++ b/net/tipc/port.c
@@ -57,8 +57,8 @@
57static struct sk_buff *msg_queue_head = NULL; 57static struct sk_buff *msg_queue_head = NULL;
58static struct sk_buff *msg_queue_tail = NULL; 58static struct sk_buff *msg_queue_tail = NULL;
59 59
60spinlock_t tipc_port_list_lock = SPIN_LOCK_UNLOCKED; 60DEFINE_SPINLOCK(tipc_port_list_lock);
61static spinlock_t queue_lock = SPIN_LOCK_UNLOCKED; 61static DEFINE_SPINLOCK(queue_lock);
62 62
63static LIST_HEAD(ports); 63static LIST_HEAD(ports);
64static void port_handle_node_down(unsigned long ref); 64static void port_handle_node_down(unsigned long ref);
diff --git a/net/tipc/ref.c b/net/tipc/ref.c
index d2f0cce10e20..596d3c8ff750 100644
--- a/net/tipc/ref.c
+++ b/net/tipc/ref.c
@@ -63,7 +63,7 @@
63 63
64struct ref_table tipc_ref_table = { NULL }; 64struct ref_table tipc_ref_table = { NULL };
65 65
66static rwlock_t ref_table_lock = RW_LOCK_UNLOCKED; 66static DEFINE_RWLOCK(ref_table_lock);
67 67
68/** 68/**
69 * tipc_ref_table_init - create reference table for objects 69 * tipc_ref_table_init - create reference table for objects
@@ -87,7 +87,7 @@ int tipc_ref_table_init(u32 requested_size, u32 start)
87 index_mask = sz - 1; 87 index_mask = sz - 1;
88 for (i = sz - 1; i >= 0; i--) { 88 for (i = sz - 1; i >= 0; i--) {
89 table[i].object = NULL; 89 table[i].object = NULL;
90 table[i].lock = SPIN_LOCK_UNLOCKED; 90 spin_lock_init(&table[i].lock);
91 table[i].data.next_plus_upper = (start & ~index_mask) + i - 1; 91 table[i].data.next_plus_upper = (start & ~index_mask) + i - 1;
92 } 92 }
93 tipc_ref_table.entries = table; 93 tipc_ref_table.entries = table;
diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c
index fc171875660c..e19b4bcd67ec 100644
--- a/net/tipc/subscr.c
+++ b/net/tipc/subscr.c
@@ -457,7 +457,7 @@ int tipc_subscr_start(void)
457 int res = -1; 457 int res = -1;
458 458
459 memset(&topsrv, 0, sizeof (topsrv)); 459 memset(&topsrv, 0, sizeof (topsrv));
460 topsrv.lock = SPIN_LOCK_UNLOCKED; 460 spin_lock_init(&topsrv.lock);
461 INIT_LIST_HEAD(&topsrv.subscriber_list); 461 INIT_LIST_HEAD(&topsrv.subscriber_list);
462 462
463 spin_lock_bh(&topsrv.lock); 463 spin_lock_bh(&topsrv.lock);
diff --git a/net/tipc/user_reg.c b/net/tipc/user_reg.c
index 3f3f933976e9..1e3ae57c7228 100644
--- a/net/tipc/user_reg.c
+++ b/net/tipc/user_reg.c
@@ -67,7 +67,7 @@ struct tipc_user {
67 67
68static struct tipc_user *users = NULL; 68static struct tipc_user *users = NULL;
69static u32 next_free_user = MAX_USERID + 1; 69static u32 next_free_user = MAX_USERID + 1;
70static spinlock_t reg_lock = SPIN_LOCK_UNLOCKED; 70static DEFINE_SPINLOCK(reg_lock);
71 71
72/** 72/**
73 * reg_init - create TIPC user registry (but don't activate it) 73 * reg_init - create TIPC user registry (but don't activate it)