diff options
author | Evgeniy Polyakov <johnpol@2ka.mipt.ru> | 2006-12-18 04:53:58 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-12-18 04:53:58 -0500 |
commit | a240d9f1d8e6421cb970632b93e71b2f66c2cd70 (patch) | |
tree | e3d103d3c3637c074d0a2bf48fbcb07dce04b70a /drivers/connector/connector.c | |
parent | 14fb8a764786e37ac26a2175638115f21980e5a3 (diff) |
[CONNECTOR]: Replace delayed work with usual work queue.
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/connector/connector.c')
-rw-r--r-- | drivers/connector/connector.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c index 4cec1a82fd43..a44db75bc25b 100644 --- a/drivers/connector/connector.c +++ b/drivers/connector/connector.c | |||
@@ -135,16 +135,15 @@ static int cn_call_callback(struct cn_msg *msg, void (*destruct_data)(void *), v | |||
135 | spin_lock_bh(&dev->cbdev->queue_lock); | 135 | spin_lock_bh(&dev->cbdev->queue_lock); |
136 | list_for_each_entry(__cbq, &dev->cbdev->queue_list, callback_entry) { | 136 | list_for_each_entry(__cbq, &dev->cbdev->queue_list, callback_entry) { |
137 | if (cn_cb_equal(&__cbq->id.id, &msg->id)) { | 137 | if (cn_cb_equal(&__cbq->id.id, &msg->id)) { |
138 | if (likely(!work_pending(&__cbq->work.work) && | 138 | if (likely(!work_pending(&__cbq->work) && |
139 | __cbq->data.ddata == NULL)) { | 139 | __cbq->data.ddata == NULL)) { |
140 | __cbq->data.callback_priv = msg; | 140 | __cbq->data.callback_priv = msg; |
141 | 141 | ||
142 | __cbq->data.ddata = data; | 142 | __cbq->data.ddata = data; |
143 | __cbq->data.destruct_data = destruct_data; | 143 | __cbq->data.destruct_data = destruct_data; |
144 | 144 | ||
145 | if (queue_delayed_work( | 145 | if (queue_work(dev->cbdev->cn_queue, |
146 | dev->cbdev->cn_queue, | 146 | &__cbq->work)) |
147 | &__cbq->work, 0)) | ||
148 | err = 0; | 147 | err = 0; |
149 | } else { | 148 | } else { |
150 | struct cn_callback_data *d; | 149 | struct cn_callback_data *d; |
@@ -158,12 +157,11 @@ static int cn_call_callback(struct cn_msg *msg, void (*destruct_data)(void *), v | |||
158 | d->destruct_data = destruct_data; | 157 | d->destruct_data = destruct_data; |
159 | d->free = __cbq; | 158 | d->free = __cbq; |
160 | 159 | ||
161 | INIT_DELAYED_WORK(&__cbq->work, | 160 | INIT_WORK(&__cbq->work, |
162 | &cn_queue_wrapper); | 161 | &cn_queue_wrapper); |
163 | 162 | ||
164 | if (queue_delayed_work( | 163 | if (queue_work(dev->cbdev->cn_queue, |
165 | dev->cbdev->cn_queue, | 164 | &__cbq->work)) |
166 | &__cbq->work, 0)) | ||
167 | err = 0; | 165 | err = 0; |
168 | else { | 166 | else { |
169 | kfree(__cbq); | 167 | kfree(__cbq); |