diff options
-rw-r--r-- | drivers/isdn/capi/kcapi.c | 6 | ||||
-rw-r--r-- | include/linux/kernelcapi.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/isdn/capi/kcapi.c b/drivers/isdn/capi/kcapi.c index 3ed34f7a1c4f..9f73bc2727c2 100644 --- a/drivers/isdn/capi/kcapi.c +++ b/drivers/isdn/capi/kcapi.c | |||
@@ -258,7 +258,7 @@ static void recv_handler(struct work_struct *work) | |||
258 | if ((!ap) || (ap->release_in_progress)) | 258 | if ((!ap) || (ap->release_in_progress)) |
259 | return; | 259 | return; |
260 | 260 | ||
261 | down(&ap->recv_sem); | 261 | mutex_lock(&ap->recv_mtx); |
262 | while ((skb = skb_dequeue(&ap->recv_queue))) { | 262 | while ((skb = skb_dequeue(&ap->recv_queue))) { |
263 | if (CAPIMSG_CMD(skb->data) == CAPI_DATA_B3_IND) | 263 | if (CAPIMSG_CMD(skb->data) == CAPI_DATA_B3_IND) |
264 | ap->nrecvdatapkt++; | 264 | ap->nrecvdatapkt++; |
@@ -267,7 +267,7 @@ static void recv_handler(struct work_struct *work) | |||
267 | 267 | ||
268 | ap->recv_message(ap, skb); | 268 | ap->recv_message(ap, skb); |
269 | } | 269 | } |
270 | up(&ap->recv_sem); | 270 | mutex_unlock(&ap->recv_mtx); |
271 | } | 271 | } |
272 | 272 | ||
273 | void capi_ctr_handle_message(struct capi_ctr * card, u16 appl, struct sk_buff *skb) | 273 | void capi_ctr_handle_message(struct capi_ctr * card, u16 appl, struct sk_buff *skb) |
@@ -547,7 +547,7 @@ u16 capi20_register(struct capi20_appl *ap) | |||
547 | ap->nsentctlpkt = 0; | 547 | ap->nsentctlpkt = 0; |
548 | ap->nsentdatapkt = 0; | 548 | ap->nsentdatapkt = 0; |
549 | ap->callback = NULL; | 549 | ap->callback = NULL; |
550 | init_MUTEX(&ap->recv_sem); | 550 | mutex_init(&ap->recv_mtx); |
551 | skb_queue_head_init(&ap->recv_queue); | 551 | skb_queue_head_init(&ap->recv_queue); |
552 | INIT_WORK(&ap->recv_work, recv_handler); | 552 | INIT_WORK(&ap->recv_work, recv_handler); |
553 | ap->release_in_progress = 0; | 553 | ap->release_in_progress = 0; |
diff --git a/include/linux/kernelcapi.h b/include/linux/kernelcapi.h index aea34e74c496..8c4350a9ed87 100644 --- a/include/linux/kernelcapi.h +++ b/include/linux/kernelcapi.h | |||
@@ -64,7 +64,7 @@ struct capi20_appl { | |||
64 | unsigned long nrecvdatapkt; | 64 | unsigned long nrecvdatapkt; |
65 | unsigned long nsentctlpkt; | 65 | unsigned long nsentctlpkt; |
66 | unsigned long nsentdatapkt; | 66 | unsigned long nsentdatapkt; |
67 | struct semaphore recv_sem; | 67 | struct mutex recv_mtx; |
68 | struct sk_buff_head recv_queue; | 68 | struct sk_buff_head recv_queue; |
69 | struct work_struct recv_work; | 69 | struct work_struct recv_work; |
70 | int release_in_progress; | 70 | int release_in_progress; |