tipc: Remove callback field from subscription structure
authorYing Xue <ying.xue@windriver.com>
Tue, 19 Jul 2011 08:21:56 +0000 (04:21 -0400)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Sun, 18 Sep 2011 02:55:14 +0000 (22:55 -0400)
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>
net/tipc/subscr.c
net/tipc/subscr.h

index 6cf7268634857bc78bea5bfa2f67cdc5c80266bc..198371723b41816da5fe9116864f13d16faa188d 100644 (file)
@@ -151,7 +151,7 @@ void tipc_subscr_report_overlap(struct subscription *sub,
        if (!must && !(sub->filter & TIPC_SUB_PORTS))
                return;
 
-       sub->event_cb(sub, found_lower, found_upper, event, port_ref, node);
+       subscr_send_event(sub, found_lower, found_upper, event, port_ref, node);
 }
 
 /**
@@ -365,7 +365,6 @@ static struct subscription *subscr_subscribe(struct tipc_subscr *s,
                subscr_terminate(subscriber);
                return NULL;
        }
-       sub->event_cb = subscr_send_event;
        INIT_LIST_HEAD(&sub->nameseq_list);
        list_add(&sub->subscription_list, &subscriber->subscription_list);
        sub->server_ref = subscriber->port_ref;
index 45d89bf4d202b6217b565a5c8e7730a5f6bebcfd..4b06ef6f8401fe9d84fca894735d74162a19645b 100644 (file)
 
 struct subscription;
 
-typedef void (*tipc_subscr_event) (struct subscription *sub,
-                                  u32 found_lower, u32 found_upper,
-                                  u32 event, u32 port_ref, u32 node);
-
 /**
  * struct subscription - TIPC network topology subscription object
  * @seq: name sequence associated with subscription
  * @timeout: duration of subscription (in ms)
  * @filter: event filtering to be done for subscription
- * @event_cb: routine invoked when a subscription event is detected
  * @timer: timer governing subscription duration (optional)
  * @nameseq_list: adjacent subscriptions in name sequence's subscription list
  * @subscription_list: adjacent subscriptions in subscriber's subscription list
@@ -61,7 +56,6 @@ struct subscription {
        struct tipc_name_seq seq;
        u32 timeout;
        u32 filter;
-       tipc_subscr_event event_cb;
        struct timer_list timer;
        struct list_head nameseq_list;
        struct list_head subscription_list;