diff options
author | Ying Xue <ying.xue@windriver.com> | 2011-07-19 04:21:56 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-09-17 22:55:14 -0400 |
commit | 7e2447763c28b8b67af67e757508c1a05c2c85b9 (patch) | |
tree | 71274fd9989c12863f3974036e8b5d4f0127bf56 /net | |
parent | 245f3d342dccad293d0cd0bbe231051b2daa695f (diff) |
tipc: Remove callback field from subscription structure
Eliminate the "event_cb" member from TIPC's "subscription" structure
since the function pointer it holds always points to subscr_send_event().
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/tipc/subscr.c | 3 | ||||
-rw-r--r-- | net/tipc/subscr.h | 6 |
2 files changed, 1 insertions, 8 deletions
diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c index 6cf726863485..198371723b41 100644 --- a/net/tipc/subscr.c +++ b/net/tipc/subscr.c | |||
@@ -151,7 +151,7 @@ void tipc_subscr_report_overlap(struct subscription *sub, | |||
151 | if (!must && !(sub->filter & TIPC_SUB_PORTS)) | 151 | if (!must && !(sub->filter & TIPC_SUB_PORTS)) |
152 | return; | 152 | return; |
153 | 153 | ||
154 | sub->event_cb(sub, found_lower, found_upper, event, port_ref, node); | 154 | subscr_send_event(sub, found_lower, found_upper, event, port_ref, node); |
155 | } | 155 | } |
156 | 156 | ||
157 | /** | 157 | /** |
@@ -365,7 +365,6 @@ static struct subscription *subscr_subscribe(struct tipc_subscr *s, | |||
365 | subscr_terminate(subscriber); | 365 | subscr_terminate(subscriber); |
366 | return NULL; | 366 | return NULL; |
367 | } | 367 | } |
368 | sub->event_cb = subscr_send_event; | ||
369 | INIT_LIST_HEAD(&sub->nameseq_list); | 368 | INIT_LIST_HEAD(&sub->nameseq_list); |
370 | list_add(&sub->subscription_list, &subscriber->subscription_list); | 369 | list_add(&sub->subscription_list, &subscriber->subscription_list); |
371 | sub->server_ref = subscriber->port_ref; | 370 | sub->server_ref = subscriber->port_ref; |
diff --git a/net/tipc/subscr.h b/net/tipc/subscr.h index 45d89bf4d202..4b06ef6f8401 100644 --- a/net/tipc/subscr.h +++ b/net/tipc/subscr.h | |||
@@ -39,16 +39,11 @@ | |||
39 | 39 | ||
40 | struct subscription; | 40 | struct subscription; |
41 | 41 | ||
42 | typedef void (*tipc_subscr_event) (struct subscription *sub, | ||
43 | u32 found_lower, u32 found_upper, | ||
44 | u32 event, u32 port_ref, u32 node); | ||
45 | |||
46 | /** | 42 | /** |
47 | * struct subscription - TIPC network topology subscription object | 43 | * struct subscription - TIPC network topology subscription object |
48 | * @seq: name sequence associated with subscription | 44 | * @seq: name sequence associated with subscription |
49 | * @timeout: duration of subscription (in ms) | 45 | * @timeout: duration of subscription (in ms) |
50 | * @filter: event filtering to be done for subscription | 46 | * @filter: event filtering to be done for subscription |
51 | * @event_cb: routine invoked when a subscription event is detected | ||
52 | * @timer: timer governing subscription duration (optional) | 47 | * @timer: timer governing subscription duration (optional) |
53 | * @nameseq_list: adjacent subscriptions in name sequence's subscription list | 48 | * @nameseq_list: adjacent subscriptions in name sequence's subscription list |
54 | * @subscription_list: adjacent subscriptions in subscriber's subscription list | 49 | * @subscription_list: adjacent subscriptions in subscriber's subscription list |
@@ -61,7 +56,6 @@ struct subscription { | |||
61 | struct tipc_name_seq seq; | 56 | struct tipc_name_seq seq; |
62 | u32 timeout; | 57 | u32 timeout; |
63 | u32 filter; | 58 | u32 filter; |
64 | tipc_subscr_event event_cb; | ||
65 | struct timer_list timer; | 59 | struct timer_list timer; |
66 | struct list_head nameseq_list; | 60 | struct list_head nameseq_list; |
67 | struct list_head subscription_list; | 61 | struct list_head subscription_list; |