diff options
Diffstat (limited to 'drivers/connector/cn_queue.c')
-rw-r--r-- | drivers/connector/cn_queue.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/connector/cn_queue.c b/drivers/connector/cn_queue.c index b418b16e910e..296f51002b55 100644 --- a/drivers/connector/cn_queue.c +++ b/drivers/connector/cn_queue.c | |||
@@ -34,7 +34,7 @@ | |||
34 | void cn_queue_wrapper(struct work_struct *work) | 34 | void cn_queue_wrapper(struct work_struct *work) |
35 | { | 35 | { |
36 | struct cn_callback_entry *cbq = | 36 | struct cn_callback_entry *cbq = |
37 | container_of(work, struct cn_callback_entry, work.work); | 37 | container_of(work, struct cn_callback_entry, work); |
38 | struct cn_callback_data *d = &cbq->data; | 38 | struct cn_callback_data *d = &cbq->data; |
39 | 39 | ||
40 | d->callback(d->callback_priv); | 40 | d->callback(d->callback_priv); |
@@ -59,13 +59,12 @@ static struct cn_callback_entry *cn_queue_alloc_callback_entry(char *name, struc | |||
59 | memcpy(&cbq->id.id, id, sizeof(struct cb_id)); | 59 | memcpy(&cbq->id.id, id, sizeof(struct cb_id)); |
60 | cbq->data.callback = callback; | 60 | cbq->data.callback = callback; |
61 | 61 | ||
62 | INIT_DELAYED_WORK(&cbq->work, &cn_queue_wrapper); | 62 | INIT_WORK(&cbq->work, &cn_queue_wrapper); |
63 | return cbq; | 63 | return cbq; |
64 | } | 64 | } |
65 | 65 | ||
66 | static void cn_queue_free_callback(struct cn_callback_entry *cbq) | 66 | static void cn_queue_free_callback(struct cn_callback_entry *cbq) |
67 | { | 67 | { |
68 | cancel_delayed_work(&cbq->work); | ||
69 | flush_workqueue(cbq->pdev->cn_queue); | 68 | flush_workqueue(cbq->pdev->cn_queue); |
70 | 69 | ||
71 | kfree(cbq); | 70 | kfree(cbq); |