aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/cm.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2006-11-22 09:57:56 -0500
committerDavid Howells <dhowells@redhat.com>2006-11-22 09:57:56 -0500
commitc4028958b6ecad064b1a6303a6a5906d4fe48d73 (patch)
tree1c4c89652c62a75da09f9b9442012007e4ac6250 /drivers/infiniband/core/cm.c
parent65f27f38446e1976cc98fd3004b110fedcddd189 (diff)
WorkStruct: make allyesconfig
Fix up for make allyesconfig. Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'drivers/infiniband/core/cm.c')
-rw-r--r--drivers/infiniband/core/cm.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
index 25b1018a476c..e1990f531d0a 100644
--- a/drivers/infiniband/core/cm.c
+++ b/drivers/infiniband/core/cm.c
@@ -101,7 +101,7 @@ struct cm_av {
101}; 101};
102 102
103struct cm_work { 103struct cm_work {
104 struct work_struct work; 104 struct delayed_work work;
105 struct list_head list; 105 struct list_head list;
106 struct cm_port *port; 106 struct cm_port *port;
107 struct ib_mad_recv_wc *mad_recv_wc; /* Received MADs */ 107 struct ib_mad_recv_wc *mad_recv_wc; /* Received MADs */
@@ -161,7 +161,7 @@ struct cm_id_private {
161 atomic_t work_count; 161 atomic_t work_count;
162}; 162};
163 163
164static void cm_work_handler(void *data); 164static void cm_work_handler(struct work_struct *work);
165 165
166static inline void cm_deref_id(struct cm_id_private *cm_id_priv) 166static inline void cm_deref_id(struct cm_id_private *cm_id_priv)
167{ 167{
@@ -669,8 +669,7 @@ static struct cm_timewait_info * cm_create_timewait_info(__be32 local_id)
669 return ERR_PTR(-ENOMEM); 669 return ERR_PTR(-ENOMEM);
670 670
671 timewait_info->work.local_id = local_id; 671 timewait_info->work.local_id = local_id;
672 INIT_WORK(&timewait_info->work.work, cm_work_handler, 672 INIT_DELAYED_WORK(&timewait_info->work.work, cm_work_handler);
673 &timewait_info->work);
674 timewait_info->work.cm_event.event = IB_CM_TIMEWAIT_EXIT; 673 timewait_info->work.cm_event.event = IB_CM_TIMEWAIT_EXIT;
675 return timewait_info; 674 return timewait_info;
676} 675}
@@ -2987,9 +2986,9 @@ static void cm_send_handler(struct ib_mad_agent *mad_agent,
2987 } 2986 }
2988} 2987}
2989 2988
2990static void cm_work_handler(void *data) 2989static void cm_work_handler(struct work_struct *_work)
2991{ 2990{
2992 struct cm_work *work = data; 2991 struct cm_work *work = container_of(_work, struct cm_work, work.work);
2993 int ret; 2992 int ret;
2994 2993
2995 switch (work->cm_event.event) { 2994 switch (work->cm_event.event) {
@@ -3079,12 +3078,12 @@ int ib_cm_establish(struct ib_cm_id *cm_id)
3079 * we need to find the cm_id once we're in the context of the 3078 * we need to find the cm_id once we're in the context of the
3080 * worker thread, rather than holding a reference on it. 3079 * worker thread, rather than holding a reference on it.
3081 */ 3080 */
3082 INIT_WORK(&work->work, cm_work_handler, work); 3081 INIT_DELAYED_WORK(&work->work, cm_work_handler);
3083 work->local_id = cm_id->local_id; 3082 work->local_id = cm_id->local_id;
3084 work->remote_id = cm_id->remote_id; 3083 work->remote_id = cm_id->remote_id;
3085 work->mad_recv_wc = NULL; 3084 work->mad_recv_wc = NULL;
3086 work->cm_event.event = IB_CM_USER_ESTABLISHED; 3085 work->cm_event.event = IB_CM_USER_ESTABLISHED;
3087 queue_work(cm.wq, &work->work); 3086 queue_delayed_work(cm.wq, &work->work, 0);
3088out: 3087out:
3089 return ret; 3088 return ret;
3090} 3089}
@@ -3146,11 +3145,11 @@ static void cm_recv_handler(struct ib_mad_agent *mad_agent,
3146 return; 3145 return;
3147 } 3146 }
3148 3147
3149 INIT_WORK(&work->work, cm_work_handler, work); 3148 INIT_DELAYED_WORK(&work->work, cm_work_handler);
3150 work->cm_event.event = event; 3149 work->cm_event.event = event;
3151 work->mad_recv_wc = mad_recv_wc; 3150 work->mad_recv_wc = mad_recv_wc;
3152 work->port = (struct cm_port *)mad_agent->context; 3151 work->port = (struct cm_port *)mad_agent->context;
3153 queue_work(cm.wq, &work->work); 3152 queue_delayed_work(cm.wq, &work->work, 0);
3154} 3153}
3155 3154
3156static int cm_init_qp_init_attr(struct cm_id_private *cm_id_priv, 3155static int cm_init_qp_init_attr(struct cm_id_private *cm_id_priv,