diff options
Diffstat (limited to 'drivers/isdn/capi/capi.c')
-rw-r--r-- | drivers/isdn/capi/capi.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index 23ae66c76d47..24c6b7ca62be 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c | |||
@@ -350,7 +350,7 @@ static void capincci_free(struct capidev *cdev, u32 ncci) | |||
350 | if (ncci == 0xffffffff || np->ncci == ncci) { | 350 | if (ncci == 0xffffffff || np->ncci == ncci) { |
351 | *pp = (*pp)->next; | 351 | *pp = (*pp)->next; |
352 | #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE | 352 | #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE |
353 | if ((mp = np->minorp) != 0) { | 353 | if ((mp = np->minorp) != NULL) { |
354 | #if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE) | 354 | #if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE) |
355 | capifs_free_ncci(mp->minor); | 355 | capifs_free_ncci(mp->minor); |
356 | #endif | 356 | #endif |
@@ -366,7 +366,7 @@ static void capincci_free(struct capidev *cdev, u32 ncci) | |||
366 | } | 366 | } |
367 | #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ | 367 | #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ |
368 | kfree(np); | 368 | kfree(np); |
369 | if (*pp == 0) return; | 369 | if (*pp == NULL) return; |
370 | } else { | 370 | } else { |
371 | pp = &(*pp)->next; | 371 | pp = &(*pp)->next; |
372 | } | 372 | } |
@@ -483,7 +483,7 @@ static int handle_recv_skb(struct capiminor *mp, struct sk_buff *skb) | |||
483 | #endif | 483 | #endif |
484 | goto bad; | 484 | goto bad; |
485 | } | 485 | } |
486 | if ((nskb = gen_data_b3_resp_for(mp, skb)) == 0) { | 486 | if ((nskb = gen_data_b3_resp_for(mp, skb)) == NULL) { |
487 | printk(KERN_ERR "capi: gen_data_b3_resp failed\n"); | 487 | printk(KERN_ERR "capi: gen_data_b3_resp failed\n"); |
488 | goto bad; | 488 | goto bad; |
489 | } | 489 | } |
@@ -512,7 +512,7 @@ bad: | |||
512 | static void handle_minor_recv(struct capiminor *mp) | 512 | static void handle_minor_recv(struct capiminor *mp) |
513 | { | 513 | { |
514 | struct sk_buff *skb; | 514 | struct sk_buff *skb; |
515 | while ((skb = skb_dequeue(&mp->inqueue)) != 0) { | 515 | while ((skb = skb_dequeue(&mp->inqueue)) != NULL) { |
516 | unsigned int len = skb->len; | 516 | unsigned int len = skb->len; |
517 | mp->inbytes -= len; | 517 | mp->inbytes -= len; |
518 | if (handle_recv_skb(mp, skb) < 0) { | 518 | if (handle_recv_skb(mp, skb) < 0) { |
@@ -538,7 +538,7 @@ static int handle_minor_send(struct capiminor *mp) | |||
538 | return 0; | 538 | return 0; |
539 | } | 539 | } |
540 | 540 | ||
541 | while ((skb = skb_dequeue(&mp->outqueue)) != 0) { | 541 | while ((skb = skb_dequeue(&mp->outqueue)) != NULL) { |
542 | datahandle = mp->datahandle; | 542 | datahandle = mp->datahandle; |
543 | len = (u16)skb->len; | 543 | len = (u16)skb->len; |
544 | skb_push(skb, CAPI_DATA_B3_REQ_LEN); | 544 | skb_push(skb, CAPI_DATA_B3_REQ_LEN); |
@@ -689,19 +689,19 @@ capi_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) | |||
689 | if (!cdev->ap.applid) | 689 | if (!cdev->ap.applid) |
690 | return -ENODEV; | 690 | return -ENODEV; |
691 | 691 | ||
692 | if ((skb = skb_dequeue(&cdev->recvqueue)) == 0) { | 692 | if ((skb = skb_dequeue(&cdev->recvqueue)) == NULL) { |
693 | 693 | ||
694 | if (file->f_flags & O_NONBLOCK) | 694 | if (file->f_flags & O_NONBLOCK) |
695 | return -EAGAIN; | 695 | return -EAGAIN; |
696 | 696 | ||
697 | for (;;) { | 697 | for (;;) { |
698 | interruptible_sleep_on(&cdev->recvwait); | 698 | interruptible_sleep_on(&cdev->recvwait); |
699 | if ((skb = skb_dequeue(&cdev->recvqueue)) != 0) | 699 | if ((skb = skb_dequeue(&cdev->recvqueue)) != NULL) |
700 | break; | 700 | break; |
701 | if (signal_pending(current)) | 701 | if (signal_pending(current)) |
702 | break; | 702 | break; |
703 | } | 703 | } |
704 | if (skb == 0) | 704 | if (skb == NULL) |
705 | return -ERESTARTNOHAND; | 705 | return -ERESTARTNOHAND; |
706 | } | 706 | } |
707 | if (skb->len > count) { | 707 | if (skb->len > count) { |
@@ -940,12 +940,12 @@ capi_ioctl(struct inode *inode, struct file *file, | |||
940 | return -EFAULT; | 940 | return -EFAULT; |
941 | 941 | ||
942 | mutex_lock(&cdev->ncci_list_mtx); | 942 | mutex_lock(&cdev->ncci_list_mtx); |
943 | if ((nccip = capincci_find(cdev, (u32) ncci)) == 0) { | 943 | if ((nccip = capincci_find(cdev, (u32) ncci)) == NULL) { |
944 | mutex_unlock(&cdev->ncci_list_mtx); | 944 | mutex_unlock(&cdev->ncci_list_mtx); |
945 | return 0; | 945 | return 0; |
946 | } | 946 | } |
947 | #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE | 947 | #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE |
948 | if ((mp = nccip->minorp) != 0) { | 948 | if ((mp = nccip->minorp) != NULL) { |
949 | count += atomic_read(&mp->ttyopencount); | 949 | count += atomic_read(&mp->ttyopencount); |
950 | } | 950 | } |
951 | #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ | 951 | #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ |
@@ -966,7 +966,7 @@ capi_ioctl(struct inode *inode, struct file *file, | |||
966 | return -EFAULT; | 966 | return -EFAULT; |
967 | mutex_lock(&cdev->ncci_list_mtx); | 967 | mutex_lock(&cdev->ncci_list_mtx); |
968 | nccip = capincci_find(cdev, (u32) ncci); | 968 | nccip = capincci_find(cdev, (u32) ncci); |
969 | if (!nccip || (mp = nccip->minorp) == 0) { | 969 | if (!nccip || (mp = nccip->minorp) == NULL) { |
970 | mutex_unlock(&cdev->ncci_list_mtx); | 970 | mutex_unlock(&cdev->ncci_list_mtx); |
971 | return -ESRCH; | 971 | return -ESRCH; |
972 | } | 972 | } |
@@ -986,7 +986,7 @@ capi_open(struct inode *inode, struct file *file) | |||
986 | if (file->private_data) | 986 | if (file->private_data) |
987 | return -EEXIST; | 987 | return -EEXIST; |
988 | 988 | ||
989 | if ((file->private_data = capidev_alloc()) == 0) | 989 | if ((file->private_data = capidev_alloc()) == NULL) |
990 | return -ENOMEM; | 990 | return -ENOMEM; |
991 | 991 | ||
992 | return nonseekable_open(inode, file); | 992 | return nonseekable_open(inode, file); |
@@ -1023,9 +1023,9 @@ static int capinc_tty_open(struct tty_struct * tty, struct file * file) | |||
1023 | struct capiminor *mp; | 1023 | struct capiminor *mp; |
1024 | unsigned long flags; | 1024 | unsigned long flags; |
1025 | 1025 | ||
1026 | if ((mp = capiminor_find(iminor(file->f_path.dentry->d_inode))) == 0) | 1026 | if ((mp = capiminor_find(iminor(file->f_path.dentry->d_inode))) == NULL) |
1027 | return -ENXIO; | 1027 | return -ENXIO; |
1028 | if (mp->nccip == 0) | 1028 | if (mp->nccip == NULL) |
1029 | return -ENXIO; | 1029 | return -ENXIO; |
1030 | 1030 | ||
1031 | tty->driver_data = (void *)mp; | 1031 | tty->driver_data = (void *)mp; |
@@ -1058,7 +1058,7 @@ static void capinc_tty_close(struct tty_struct * tty, struct file * file) | |||
1058 | #ifdef _DEBUG_REFCOUNT | 1058 | #ifdef _DEBUG_REFCOUNT |
1059 | printk(KERN_DEBUG "capinc_tty_close ocount=%d\n", atomic_read(&mp->ttyopencount)); | 1059 | printk(KERN_DEBUG "capinc_tty_close ocount=%d\n", atomic_read(&mp->ttyopencount)); |
1060 | #endif | 1060 | #endif |
1061 | if (mp->nccip == 0) | 1061 | if (mp->nccip == NULL) |
1062 | capiminor_free(mp); | 1062 | capiminor_free(mp); |
1063 | } | 1063 | } |
1064 | 1064 | ||
@@ -1526,9 +1526,9 @@ static int __init capi_init(void) | |||
1526 | char *compileinfo; | 1526 | char *compileinfo; |
1527 | int major_ret; | 1527 | int major_ret; |
1528 | 1528 | ||
1529 | if ((p = strchr(revision, ':')) != 0 && p[1]) { | 1529 | if ((p = strchr(revision, ':')) != NULL && p[1]) { |
1530 | strlcpy(rev, p + 2, sizeof(rev)); | 1530 | strlcpy(rev, p + 2, sizeof(rev)); |
1531 | if ((p = strchr(rev, '$')) != 0 && p > rev) | 1531 | if ((p = strchr(rev, '$')) != NULL && p > rev) |
1532 | *(p-1) = 0; | 1532 | *(p-1) = 0; |
1533 | } else | 1533 | } else |
1534 | strcpy(rev, "1.0"); | 1534 | strcpy(rev, "1.0"); |