diff options
Diffstat (limited to 'drivers/isdn/capi/kcapi.c')
-rw-r--r-- | drivers/isdn/capi/kcapi.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/isdn/capi/kcapi.c b/drivers/isdn/capi/kcapi.c index 8c4fcb9027b3..783a25526315 100644 --- a/drivers/isdn/capi/kcapi.c +++ b/drivers/isdn/capi/kcapi.c | |||
@@ -208,9 +208,10 @@ static void notify_down(u32 contr) | |||
208 | } | 208 | } |
209 | } | 209 | } |
210 | 210 | ||
211 | static void notify_handler(void *data) | 211 | static void notify_handler(struct work_struct *work) |
212 | { | 212 | { |
213 | struct capi_notifier *np = data; | 213 | struct capi_notifier *np = |
214 | container_of(work, struct capi_notifier, work); | ||
214 | 215 | ||
215 | switch (np->cmd) { | 216 | switch (np->cmd) { |
216 | case KCI_CONTRUP: | 217 | case KCI_CONTRUP: |
@@ -235,7 +236,7 @@ static int notify_push(unsigned int cmd, u32 controller, u16 applid, u32 ncci) | |||
235 | if (!np) | 236 | if (!np) |
236 | return -ENOMEM; | 237 | return -ENOMEM; |
237 | 238 | ||
238 | INIT_WORK(&np->work, notify_handler, np); | 239 | INIT_WORK(&np->work, notify_handler); |
239 | np->cmd = cmd; | 240 | np->cmd = cmd; |
240 | np->controller = controller; | 241 | np->controller = controller; |
241 | np->applid = applid; | 242 | np->applid = applid; |
@@ -248,10 +249,11 @@ static int notify_push(unsigned int cmd, u32 controller, u16 applid, u32 ncci) | |||
248 | 249 | ||
249 | /* -------- Receiver ------------------------------------------ */ | 250 | /* -------- Receiver ------------------------------------------ */ |
250 | 251 | ||
251 | static void recv_handler(void *_ap) | 252 | static void recv_handler(struct work_struct *work) |
252 | { | 253 | { |
253 | struct sk_buff *skb; | 254 | struct sk_buff *skb; |
254 | struct capi20_appl *ap = (struct capi20_appl *) _ap; | 255 | struct capi20_appl *ap = |
256 | container_of(work, struct capi20_appl, recv_work); | ||
255 | 257 | ||
256 | if ((!ap) || (ap->release_in_progress)) | 258 | if ((!ap) || (ap->release_in_progress)) |
257 | return; | 259 | return; |
@@ -527,7 +529,7 @@ u16 capi20_register(struct capi20_appl *ap) | |||
527 | ap->callback = NULL; | 529 | ap->callback = NULL; |
528 | init_MUTEX(&ap->recv_sem); | 530 | init_MUTEX(&ap->recv_sem); |
529 | skb_queue_head_init(&ap->recv_queue); | 531 | skb_queue_head_init(&ap->recv_queue); |
530 | INIT_WORK(&ap->recv_work, recv_handler, (void *)ap); | 532 | INIT_WORK(&ap->recv_work, recv_handler); |
531 | ap->release_in_progress = 0; | 533 | ap->release_in_progress = 0; |
532 | 534 | ||
533 | write_unlock_irqrestore(&application_lock, flags); | 535 | write_unlock_irqrestore(&application_lock, flags); |