diff options
Diffstat (limited to 'drivers/connector/connector.c')
-rw-r--r-- | drivers/connector/connector.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c index e59f0ab8f828..f06024668f99 100644 --- a/drivers/connector/connector.c +++ b/drivers/connector/connector.c | |||
@@ -129,7 +129,7 @@ EXPORT_SYMBOL_GPL(cn_netlink_send); | |||
129 | /* | 129 | /* |
130 | * Callback helper - queues work and setup destructor for given data. | 130 | * Callback helper - queues work and setup destructor for given data. |
131 | */ | 131 | */ |
132 | static int cn_call_callback(struct sk_buff *skb, void (*destruct_data)(void *), void *data) | 132 | static int cn_call_callback(struct sk_buff *skb) |
133 | { | 133 | { |
134 | struct cn_callback_entry *__cbq, *__new_cbq; | 134 | struct cn_callback_entry *__cbq, *__new_cbq; |
135 | struct cn_dev *dev = &cdev; | 135 | struct cn_dev *dev = &cdev; |
@@ -140,12 +140,9 @@ static int cn_call_callback(struct sk_buff *skb, void (*destruct_data)(void *), | |||
140 | list_for_each_entry(__cbq, &dev->cbdev->queue_list, callback_entry) { | 140 | list_for_each_entry(__cbq, &dev->cbdev->queue_list, callback_entry) { |
141 | if (cn_cb_equal(&__cbq->id.id, &msg->id)) { | 141 | if (cn_cb_equal(&__cbq->id.id, &msg->id)) { |
142 | if (likely(!work_pending(&__cbq->work) && | 142 | if (likely(!work_pending(&__cbq->work) && |
143 | __cbq->data.ddata == NULL)) { | 143 | __cbq->data.skb == NULL)) { |
144 | __cbq->data.skb = skb; | 144 | __cbq->data.skb = skb; |
145 | 145 | ||
146 | __cbq->data.ddata = data; | ||
147 | __cbq->data.destruct_data = destruct_data; | ||
148 | |||
149 | if (queue_cn_work(__cbq, &__cbq->work)) | 146 | if (queue_cn_work(__cbq, &__cbq->work)) |
150 | err = 0; | 147 | err = 0; |
151 | else | 148 | else |
@@ -159,8 +156,6 @@ static int cn_call_callback(struct sk_buff *skb, void (*destruct_data)(void *), | |||
159 | d = &__new_cbq->data; | 156 | d = &__new_cbq->data; |
160 | d->skb = skb; | 157 | d->skb = skb; |
161 | d->callback = __cbq->data.callback; | 158 | d->callback = __cbq->data.callback; |
162 | d->ddata = data; | ||
163 | d->destruct_data = destruct_data; | ||
164 | d->free = __new_cbq; | 159 | d->free = __new_cbq; |
165 | 160 | ||
166 | __new_cbq->pdev = __cbq->pdev; | 161 | __new_cbq->pdev = __cbq->pdev; |
@@ -208,7 +203,7 @@ static void cn_rx_skb(struct sk_buff *__skb) | |||
208 | return; | 203 | return; |
209 | } | 204 | } |
210 | 205 | ||
211 | err = cn_call_callback(skb, (void (*)(void *))kfree_skb, skb); | 206 | err = cn_call_callback(skb); |
212 | if (err < 0) | 207 | if (err < 0) |
213 | kfree_skb(skb); | 208 | kfree_skb(skb); |
214 | } | 209 | } |