summaryrefslogtreecommitdiff
path: root/drivers/connector/connector.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-10-15 03:55:22 +0400
committerDavid S. Miller <davem@davemloft.net>2010-10-25 01:20:01 +0400
commit6cebb17beece746de86793cd549e84740896cf4a (patch)
tree6f5a3ee1ab6ee0147688f7e2343055645f7a64e7 /drivers/connector/connector.c
parent229aebb873e29726b91e076161649cf45154b0bf (diff)
downloadlinux-6cebb17beece746de86793cd549e84740896cf4a.tar.xz
connector: remove lazy workqueue creation
Commit 1a5645bc (connector: create connector workqueue only while needed once) implements lazy workqueue creation for connector workqueue. With cmwq now in place, lazy workqueue creation doesn't make much sense while adding a lot of complexity. Remove it and allocate an ordered workqueue during initialization. This also removes a call to flush_scheduled_work() which is deprecated and scheduled to be removed. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/connector/connector.c')
-rw-r--r--drivers/connector/connector.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c
index 1d48f40342cb..e16c3fa8d2e3 100644
--- a/drivers/connector/connector.c
+++ b/drivers/connector/connector.c
@@ -133,7 +133,8 @@ static int cn_call_callback(struct sk_buff *skb)
__cbq->data.skb == NULL)) {
__cbq->data.skb = skb;
- if (queue_cn_work(__cbq, &__cbq->work))
+ if (queue_work(dev->cbdev->cn_queue,
+ &__cbq->work))
err = 0;
else
err = -EINVAL;
@@ -148,13 +149,11 @@ static int cn_call_callback(struct sk_buff *skb)
d->callback = __cbq->data.callback;
d->free = __new_cbq;
- __new_cbq->pdev = __cbq->pdev;
-
INIT_WORK(&__new_cbq->work,
&cn_queue_wrapper);
- if (queue_cn_work(__new_cbq,
- &__new_cbq->work))
+ if (queue_work(dev->cbdev->cn_queue,
+ &__new_cbq->work))
err = 0;
else {
kfree(__new_cbq);