diff options
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/gigaset/common.c | 6 | ||||
-rw-r--r-- | drivers/isdn/hisax/hisax_fcpcipnp.c | 34 | ||||
-rw-r--r-- | drivers/isdn/i4l/isdn_common.c | 4 | ||||
-rw-r--r-- | drivers/isdn/i4l/isdn_ttyfax.c | 3 | ||||
-rw-r--r-- | drivers/isdn/i4l/isdn_v110.c | 2 | ||||
-rw-r--r-- | drivers/isdn/isdnloop/isdnloop.c | 6 |
6 files changed, 29 insertions, 26 deletions
diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c index aacedec4986f..827c32c16795 100644 --- a/drivers/isdn/gigaset/common.c +++ b/drivers/isdn/gigaset/common.c | |||
@@ -637,7 +637,6 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels, | |||
637 | err("maximum number of devices exceeded"); | 637 | err("maximum number of devices exceeded"); |
638 | return NULL; | 638 | return NULL; |
639 | } | 639 | } |
640 | mutex_init(&cs->mutex); | ||
641 | 640 | ||
642 | gig_dbg(DEBUG_INIT, "allocating bcs[0..%d]", channels - 1); | 641 | gig_dbg(DEBUG_INIT, "allocating bcs[0..%d]", channels - 1); |
643 | cs->bcs = kmalloc(channels * sizeof(struct bc_state), GFP_KERNEL); | 642 | cs->bcs = kmalloc(channels * sizeof(struct bc_state), GFP_KERNEL); |
@@ -898,8 +897,10 @@ int gigaset_shutdown(struct cardstate *cs) | |||
898 | { | 897 | { |
899 | mutex_lock(&cs->mutex); | 898 | mutex_lock(&cs->mutex); |
900 | 899 | ||
901 | if (!(cs->flags & VALID_MINOR)) | 900 | if (!(cs->flags & VALID_MINOR)) { |
901 | mutex_unlock(&cs->mutex); | ||
902 | return -1; | 902 | return -1; |
903 | } | ||
903 | 904 | ||
904 | cs->waiting = 1; | 905 | cs->waiting = 1; |
905 | 906 | ||
@@ -1086,6 +1087,7 @@ struct gigaset_driver *gigaset_initdriver(unsigned minor, unsigned minors, | |||
1086 | drv->cs[i].driver = drv; | 1087 | drv->cs[i].driver = drv; |
1087 | drv->cs[i].ops = drv->ops; | 1088 | drv->cs[i].ops = drv->ops; |
1088 | drv->cs[i].minor_index = i; | 1089 | drv->cs[i].minor_index = i; |
1090 | mutex_init(&drv->cs[i].mutex); | ||
1089 | } | 1091 | } |
1090 | 1092 | ||
1091 | gigaset_if_initdriver(drv, procname, devname); | 1093 | gigaset_if_initdriver(drv, procname, devname); |
diff --git a/drivers/isdn/hisax/hisax_fcpcipnp.c b/drivers/isdn/hisax/hisax_fcpcipnp.c index 7993e01f9fc5..76043dedba5b 100644 --- a/drivers/isdn/hisax/hisax_fcpcipnp.c +++ b/drivers/isdn/hisax/hisax_fcpcipnp.c | |||
@@ -725,23 +725,6 @@ static int __devinit fcpcipnp_setup(struct fritz_adapter *adapter) | |||
725 | 725 | ||
726 | switch (adapter->type) { | 726 | switch (adapter->type) { |
727 | case AVM_FRITZ_PCIV2: | 727 | case AVM_FRITZ_PCIV2: |
728 | retval = request_irq(adapter->irq, fcpci2_irq, IRQF_SHARED, | ||
729 | "fcpcipnp", adapter); | ||
730 | break; | ||
731 | case AVM_FRITZ_PCI: | ||
732 | retval = request_irq(adapter->irq, fcpci_irq, IRQF_SHARED, | ||
733 | "fcpcipnp", adapter); | ||
734 | break; | ||
735 | case AVM_FRITZ_PNP: | ||
736 | retval = request_irq(adapter->irq, fcpci_irq, 0, | ||
737 | "fcpcipnp", adapter); | ||
738 | break; | ||
739 | } | ||
740 | if (retval) | ||
741 | goto err_region; | ||
742 | |||
743 | switch (adapter->type) { | ||
744 | case AVM_FRITZ_PCIV2: | ||
745 | case AVM_FRITZ_PCI: | 728 | case AVM_FRITZ_PCI: |
746 | val = inl(adapter->io); | 729 | val = inl(adapter->io); |
747 | break; | 730 | break; |
@@ -796,6 +779,23 @@ static int __devinit fcpcipnp_setup(struct fritz_adapter *adapter) | |||
796 | 779 | ||
797 | switch (adapter->type) { | 780 | switch (adapter->type) { |
798 | case AVM_FRITZ_PCIV2: | 781 | case AVM_FRITZ_PCIV2: |
782 | retval = request_irq(adapter->irq, fcpci2_irq, IRQF_SHARED, | ||
783 | "fcpcipnp", adapter); | ||
784 | break; | ||
785 | case AVM_FRITZ_PCI: | ||
786 | retval = request_irq(adapter->irq, fcpci_irq, IRQF_SHARED, | ||
787 | "fcpcipnp", adapter); | ||
788 | break; | ||
789 | case AVM_FRITZ_PNP: | ||
790 | retval = request_irq(adapter->irq, fcpci_irq, 0, | ||
791 | "fcpcipnp", adapter); | ||
792 | break; | ||
793 | } | ||
794 | if (retval) | ||
795 | goto err_region; | ||
796 | |||
797 | switch (adapter->type) { | ||
798 | case AVM_FRITZ_PCIV2: | ||
799 | fcpci2_init(adapter); | 799 | fcpci2_init(adapter); |
800 | isacsx_setup(&adapter->isac); | 800 | isacsx_setup(&adapter->isac); |
801 | break; | 801 | break; |
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c index 9cef6fcf587b..d4ad6992f776 100644 --- a/drivers/isdn/i4l/isdn_common.c +++ b/drivers/isdn/i4l/isdn_common.c | |||
@@ -981,13 +981,13 @@ isdn_readbchan_tty(int di, int channel, struct tty_struct *tty, int cisco_hack) | |||
981 | } | 981 | } |
982 | 982 | ||
983 | 983 | ||
984 | static __inline int | 984 | static inline int |
985 | isdn_minor2drv(int minor) | 985 | isdn_minor2drv(int minor) |
986 | { | 986 | { |
987 | return (dev->drvmap[minor]); | 987 | return (dev->drvmap[minor]); |
988 | } | 988 | } |
989 | 989 | ||
990 | static __inline int | 990 | static inline int |
991 | isdn_minor2chan(int minor) | 991 | isdn_minor2chan(int minor) |
992 | { | 992 | { |
993 | return (dev->chanmap[minor]); | 993 | return (dev->chanmap[minor]); |
diff --git a/drivers/isdn/i4l/isdn_ttyfax.c b/drivers/isdn/i4l/isdn_ttyfax.c index f93de4a30355..78f7660c1d0e 100644 --- a/drivers/isdn/i4l/isdn_ttyfax.c +++ b/drivers/isdn/i4l/isdn_ttyfax.c | |||
@@ -906,7 +906,8 @@ isdn_tty_cmd_FCLASS2(char **p, modem_info * info) | |||
906 | sprintf(rs, "\r\n0-2"); | 906 | sprintf(rs, "\r\n0-2"); |
907 | isdn_tty_at_cout(rs, info); | 907 | isdn_tty_at_cout(rs, info); |
908 | } else { | 908 | } else { |
909 | if ((f->phase != ISDN_FAX_PHASE_D) || (!info->faxonline & 1)) | 909 | if ((f->phase != ISDN_FAX_PHASE_D) || |
910 | (!(info->faxonline & 1))) | ||
910 | PARSE_ERROR1; | 911 | PARSE_ERROR1; |
911 | par = isdn_getnum(p); | 912 | par = isdn_getnum(p); |
912 | if ((par < 0) || (par > 2)) | 913 | if ((par < 0) || (par > 2)) |
diff --git a/drivers/isdn/i4l/isdn_v110.c b/drivers/isdn/i4l/isdn_v110.c index 5484d3c38a57..c5d02b6aafab 100644 --- a/drivers/isdn/i4l/isdn_v110.c +++ b/drivers/isdn/i4l/isdn_v110.c | |||
@@ -62,7 +62,7 @@ static unsigned char V110_OffMatrix_38400[] = | |||
62 | * and to 67452301 when keylen = 2. This is necessary because ordering on | 62 | * and to 67452301 when keylen = 2. This is necessary because ordering on |
63 | * the isdn line is the other way. | 63 | * the isdn line is the other way. |
64 | */ | 64 | */ |
65 | static __inline unsigned char | 65 | static inline unsigned char |
66 | FlipBits(unsigned char c, int keylen) | 66 | FlipBits(unsigned char c, int keylen) |
67 | { | 67 | { |
68 | unsigned char b = c; | 68 | unsigned char b = c; |
diff --git a/drivers/isdn/isdnloop/isdnloop.c b/drivers/isdn/isdnloop/isdnloop.c index 655ef9a3f4df..a335c85a736e 100644 --- a/drivers/isdn/isdnloop/isdnloop.c +++ b/drivers/isdn/isdnloop/isdnloop.c | |||
@@ -1289,7 +1289,7 @@ isdnloop_command(isdn_ctrl * c, isdnloop_card * card) | |||
1289 | } | 1289 | } |
1290 | break; | 1290 | break; |
1291 | case ISDN_CMD_CLREAZ: | 1291 | case ISDN_CMD_CLREAZ: |
1292 | if (!card->flags & ISDNLOOP_FLAGS_RUNNING) | 1292 | if (!(card->flags & ISDNLOOP_FLAGS_RUNNING)) |
1293 | return -ENODEV; | 1293 | return -ENODEV; |
1294 | if (card->leased) | 1294 | if (card->leased) |
1295 | break; | 1295 | break; |
@@ -1333,7 +1333,7 @@ isdnloop_command(isdn_ctrl * c, isdnloop_card * card) | |||
1333 | } | 1333 | } |
1334 | break; | 1334 | break; |
1335 | case ISDN_CMD_SETL3: | 1335 | case ISDN_CMD_SETL3: |
1336 | if (!card->flags & ISDNLOOP_FLAGS_RUNNING) | 1336 | if (!(card->flags & ISDNLOOP_FLAGS_RUNNING)) |
1337 | return -ENODEV; | 1337 | return -ENODEV; |
1338 | return 0; | 1338 | return 0; |
1339 | default: | 1339 | default: |
@@ -1380,7 +1380,7 @@ if_writecmd(const u_char __user *buf, int len, int id, int channel) | |||
1380 | isdnloop_card *card = isdnloop_findcard(id); | 1380 | isdnloop_card *card = isdnloop_findcard(id); |
1381 | 1381 | ||
1382 | if (card) { | 1382 | if (card) { |
1383 | if (!card->flags & ISDNLOOP_FLAGS_RUNNING) | 1383 | if (!(card->flags & ISDNLOOP_FLAGS_RUNNING)) |
1384 | return -ENODEV; | 1384 | return -ENODEV; |
1385 | return (isdnloop_writecmd(buf, len, 1, card)); | 1385 | return (isdnloop_writecmd(buf, len, 1, card)); |
1386 | } | 1386 | } |