aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/capi/Kconfig15
-rw-r--r--drivers/isdn/capi/Makefile1
-rw-r--r--drivers/isdn/capi/capi.c139
-rw-r--r--drivers/isdn/capi/capifs.c239
-rw-r--r--drivers/isdn/capi/capifs.h28
-rw-r--r--drivers/isdn/gigaset/bas-gigaset.c5
-rw-r--r--drivers/isdn/gigaset/ev-layer.c26
-rw-r--r--drivers/isdn/gigaset/ser-gigaset.c8
-rw-r--r--drivers/isdn/hardware/avm/avm_cs.c2
-rw-r--r--drivers/isdn/hardware/eicon/debug.c3
-rw-r--r--drivers/isdn/hardware/eicon/divacapi.h2
-rw-r--r--drivers/isdn/hardware/eicon/io.h2
-rw-r--r--drivers/isdn/hardware/eicon/message.c27
-rw-r--r--drivers/isdn/hardware/eicon/pc.h2
-rw-r--r--drivers/isdn/hardware/eicon/um_idi.c2
-rw-r--r--drivers/isdn/hardware/mISDN/hfcmulti.c4
-rw-r--r--drivers/isdn/hardware/mISDN/hfcpci.c8
-rw-r--r--drivers/isdn/hardware/mISDN/hfcsusb.c5
-rw-r--r--drivers/isdn/hardware/mISDN/netjet.c6
-rw-r--r--drivers/isdn/hisax/arcofi.c4
-rw-r--r--drivers/isdn/hisax/avma1_cs.c2
-rw-r--r--drivers/isdn/hisax/elsa_cs.c4
-rw-r--r--drivers/isdn/hisax/elsa_ser.c3
-rw-r--r--drivers/isdn/hisax/hfc_pci.c2
-rw-r--r--drivers/isdn/hisax/hfc_sx.c2
-rw-r--r--drivers/isdn/hisax/hfc_usb.c6
-rw-r--r--drivers/isdn/hisax/hfc_usb.h2
-rw-r--r--drivers/isdn/hisax/ipacx.c4
-rw-r--r--drivers/isdn/hisax/jade.c3
-rw-r--r--drivers/isdn/hisax/l3dss1.c8
-rw-r--r--drivers/isdn/hisax/l3ni1.c8
-rw-r--r--drivers/isdn/hisax/nj_s.c2
-rw-r--r--drivers/isdn/hisax/sedlbauer_cs.c2
-rw-r--r--drivers/isdn/hisax/st5481.h1
-rw-r--r--drivers/isdn/hisax/st5481_b.c2
-rw-r--r--drivers/isdn/hisax/st5481_init.c6
-rw-r--r--drivers/isdn/hisax/st5481_usb.c2
-rw-r--r--drivers/isdn/hisax/teles_cs.c6
-rw-r--r--drivers/isdn/hysdn/hysdn_proclog.c11
-rw-r--r--drivers/isdn/hysdn/hysdn_sched.c2
-rw-r--r--drivers/isdn/i4l/isdn_common.c11
-rw-r--r--drivers/isdn/i4l/isdn_net.c6
-rw-r--r--drivers/isdn/i4l/isdn_ppp.c4
-rw-r--r--drivers/isdn/i4l/isdn_tty.c4
-rw-r--r--drivers/isdn/isdnloop/isdnloop.c2
-rw-r--r--drivers/isdn/mISDN/dsp.h2
-rw-r--r--drivers/isdn/mISDN/dsp_cmx.c4
-rw-r--r--drivers/isdn/mISDN/dsp_core.c8
-rw-r--r--drivers/isdn/mISDN/dsp_dtmf.c4
-rw-r--r--drivers/isdn/mISDN/dsp_tones.c2
-rw-r--r--drivers/isdn/mISDN/l1oip_core.c6
-rw-r--r--drivers/isdn/mISDN/layer2.c24
-rw-r--r--drivers/isdn/mISDN/socket.c3
53 files changed, 138 insertions, 548 deletions
diff --git a/drivers/isdn/capi/Kconfig b/drivers/isdn/capi/Kconfig
index a168e8a891be..15c3ffd9d860 100644
--- a/drivers/isdn/capi/Kconfig
+++ b/drivers/isdn/capi/Kconfig
@@ -33,21 +33,6 @@ config ISDN_CAPI_CAPI20
33 standardized libcapi20 to access this functionality. You should say 33 standardized libcapi20 to access this functionality. You should say
34 Y/M here. 34 Y/M here.
35 35
36config ISDN_CAPI_CAPIFS_BOOL
37 bool "CAPI2.0 filesystem support (DEPRECATED)"
38 depends on ISDN_CAPI_MIDDLEWARE && ISDN_CAPI_CAPI20
39 help
40 This option provides a special file system, similar to /dev/pts with
41 device nodes for the special ttys established by using the
42 middleware extension above.
43 You no longer need this, udev fully replaces it. This feature is
44 scheduled for removal.
45
46config ISDN_CAPI_CAPIFS
47 tristate
48 depends on ISDN_CAPI_CAPIFS_BOOL
49 default ISDN_CAPI_CAPI20
50
51config ISDN_CAPI_CAPIDRV 36config ISDN_CAPI_CAPIDRV
52 tristate "CAPI2.0 capidrv interface support" 37 tristate "CAPI2.0 capidrv interface support"
53 depends on ISDN_I4L 38 depends on ISDN_I4L
diff --git a/drivers/isdn/capi/Makefile b/drivers/isdn/capi/Makefile
index 57123e3e4978..4d5b4b71db1e 100644
--- a/drivers/isdn/capi/Makefile
+++ b/drivers/isdn/capi/Makefile
@@ -7,7 +7,6 @@
7obj-$(CONFIG_ISDN_CAPI) += kernelcapi.o 7obj-$(CONFIG_ISDN_CAPI) += kernelcapi.o
8obj-$(CONFIG_ISDN_CAPI_CAPI20) += capi.o 8obj-$(CONFIG_ISDN_CAPI_CAPI20) += capi.o
9obj-$(CONFIG_ISDN_CAPI_CAPIDRV) += capidrv.o 9obj-$(CONFIG_ISDN_CAPI_CAPIDRV) += capidrv.o
10obj-$(CONFIG_ISDN_CAPI_CAPIFS) += capifs.o
11 10
12# Multipart objects. 11# Multipart objects.
13 12
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
index 0d7088367038..e44933d58790 100644
--- a/drivers/isdn/capi/capi.c
+++ b/drivers/isdn/capi/capi.c
@@ -38,15 +38,10 @@
38#include <linux/isdn/capiutil.h> 38#include <linux/isdn/capiutil.h>
39#include <linux/isdn/capicmd.h> 39#include <linux/isdn/capicmd.h>
40 40
41#include "capifs.h"
42
43MODULE_DESCRIPTION("CAPI4Linux: Userspace /dev/capi20 interface"); 41MODULE_DESCRIPTION("CAPI4Linux: Userspace /dev/capi20 interface");
44MODULE_AUTHOR("Carsten Paeth"); 42MODULE_AUTHOR("Carsten Paeth");
45MODULE_LICENSE("GPL"); 43MODULE_LICENSE("GPL");
46 44
47#undef _DEBUG_TTYFUNCS /* call to tty_driver */
48#undef _DEBUG_DATAFLOW /* data flow */
49
50/* -------- driver information -------------------------------------- */ 45/* -------- driver information -------------------------------------- */
51 46
52static DEFINE_MUTEX(capi_mutex); 47static DEFINE_MUTEX(capi_mutex);
@@ -85,7 +80,6 @@ struct capiminor {
85 struct kref kref; 80 struct kref kref;
86 81
87 unsigned int minor; 82 unsigned int minor;
88 struct dentry *capifs_dentry;
89 83
90 struct capi20_appl *ap; 84 struct capi20_appl *ap;
91 u32 ncci; 85 u32 ncci;
@@ -300,17 +294,8 @@ static void capiminor_free(struct capiminor *mp)
300 294
301static void capincci_alloc_minor(struct capidev *cdev, struct capincci *np) 295static void capincci_alloc_minor(struct capidev *cdev, struct capincci *np)
302{ 296{
303 struct capiminor *mp; 297 if (cdev->userflags & CAPIFLAG_HIGHJACKING)
304 dev_t device; 298 np->minorp = capiminor_alloc(&cdev->ap, np->ncci);
305
306 if (!(cdev->userflags & CAPIFLAG_HIGHJACKING))
307 return;
308
309 mp = np->minorp = capiminor_alloc(&cdev->ap, np->ncci);
310 if (mp) {
311 device = MKDEV(capinc_tty_driver->major, mp->minor);
312 mp->capifs_dentry = capifs_new_ncci(mp->minor, device);
313 }
314} 299}
315 300
316static void capincci_free_minor(struct capincci *np) 301static void capincci_free_minor(struct capincci *np)
@@ -319,8 +304,6 @@ static void capincci_free_minor(struct capincci *np)
319 struct tty_struct *tty; 304 struct tty_struct *tty;
320 305
321 if (mp) { 306 if (mp) {
322 capifs_free_ncci(mp->capifs_dentry);
323
324 tty = tty_port_tty_get(&mp->port); 307 tty = tty_port_tty_get(&mp->port);
325 if (tty) { 308 if (tty) {
326 tty_vhangup(tty); 309 tty_vhangup(tty);
@@ -432,9 +415,7 @@ static int handle_recv_skb(struct capiminor *mp, struct sk_buff *skb)
432 415
433 tty = tty_port_tty_get(&mp->port); 416 tty = tty_port_tty_get(&mp->port);
434 if (!tty) { 417 if (!tty) {
435#ifdef _DEBUG_DATAFLOW 418 pr_debug("capi: currently no receiver\n");
436 printk(KERN_DEBUG "capi: currently no receiver\n");
437#endif
438 return -1; 419 return -1;
439 } 420 }
440 421
@@ -447,23 +428,17 @@ static int handle_recv_skb(struct capiminor *mp, struct sk_buff *skb)
447 } 428 }
448 429
449 if (ld->ops->receive_buf == NULL) { 430 if (ld->ops->receive_buf == NULL) {
450#if defined(_DEBUG_DATAFLOW) || defined(_DEBUG_TTYFUNCS) 431 pr_debug("capi: ldisc has no receive_buf function\n");
451 printk(KERN_DEBUG "capi: ldisc has no receive_buf function\n");
452#endif
453 /* fatal error, do not requeue */ 432 /* fatal error, do not requeue */
454 goto free_skb; 433 goto free_skb;
455 } 434 }
456 if (mp->ttyinstop) { 435 if (mp->ttyinstop) {
457#if defined(_DEBUG_DATAFLOW) || defined(_DEBUG_TTYFUNCS) 436 pr_debug("capi: recv tty throttled\n");
458 printk(KERN_DEBUG "capi: recv tty throttled\n");
459#endif
460 goto deref_ldisc; 437 goto deref_ldisc;
461 } 438 }
462 439
463 if (tty->receive_room < datalen) { 440 if (tty->receive_room < datalen) {
464#if defined(_DEBUG_DATAFLOW) || defined(_DEBUG_TTYFUNCS) 441 pr_debug("capi: no room in tty\n");
465 printk(KERN_DEBUG "capi: no room in tty\n");
466#endif
467 goto deref_ldisc; 442 goto deref_ldisc;
468 } 443 }
469 444
@@ -479,10 +454,8 @@ static int handle_recv_skb(struct capiminor *mp, struct sk_buff *skb)
479 454
480 if (errcode == CAPI_NOERROR) { 455 if (errcode == CAPI_NOERROR) {
481 skb_pull(skb, CAPIMSG_LEN(skb->data)); 456 skb_pull(skb, CAPIMSG_LEN(skb->data));
482#ifdef _DEBUG_DATAFLOW 457 pr_debug("capi: DATA_B3_RESP %u len=%d => ldisc\n",
483 printk(KERN_DEBUG "capi: DATA_B3_RESP %u len=%d => ldisc\n", 458 datahandle, skb->len);
484 datahandle, skb->len);
485#endif
486 ld->ops->receive_buf(tty, skb->data, NULL, skb->len); 459 ld->ops->receive_buf(tty, skb->data, NULL, skb->len);
487 } else { 460 } else {
488 printk(KERN_ERR "capi: send DATA_B3_RESP failed=%x\n", 461 printk(KERN_ERR "capi: send DATA_B3_RESP failed=%x\n",
@@ -529,9 +502,7 @@ static void handle_minor_send(struct capiminor *mp)
529 return; 502 return;
530 503
531 if (mp->ttyoutstop) { 504 if (mp->ttyoutstop) {
532#if defined(_DEBUG_DATAFLOW) || defined(_DEBUG_TTYFUNCS) 505 pr_debug("capi: send: tty stopped\n");
533 printk(KERN_DEBUG "capi: send: tty stopped\n");
534#endif
535 tty_kref_put(tty); 506 tty_kref_put(tty);
536 return; 507 return;
537 } 508 }
@@ -573,10 +544,8 @@ static void handle_minor_send(struct capiminor *mp)
573 } 544 }
574 errcode = capi20_put_message(mp->ap, skb); 545 errcode = capi20_put_message(mp->ap, skb);
575 if (errcode == CAPI_NOERROR) { 546 if (errcode == CAPI_NOERROR) {
576#ifdef _DEBUG_DATAFLOW 547 pr_debug("capi: DATA_B3_REQ %u len=%u\n",
577 printk(KERN_DEBUG "capi: DATA_B3_REQ %u len=%u\n", 548 datahandle, len);
578 datahandle, len);
579#endif
580 continue; 549 continue;
581 } 550 }
582 capiminor_del_ack(mp, datahandle); 551 capiminor_del_ack(mp, datahandle);
@@ -650,10 +619,8 @@ static void capi_recv_message(struct capi20_appl *ap, struct sk_buff *skb)
650 } 619 }
651 if (CAPIMSG_SUBCOMMAND(skb->data) == CAPI_IND) { 620 if (CAPIMSG_SUBCOMMAND(skb->data) == CAPI_IND) {
652 datahandle = CAPIMSG_U16(skb->data, CAPIMSG_BASELEN+4+4+2); 621 datahandle = CAPIMSG_U16(skb->data, CAPIMSG_BASELEN+4+4+2);
653#ifdef _DEBUG_DATAFLOW 622 pr_debug("capi_signal: DATA_B3_IND %u len=%d\n",
654 printk(KERN_DEBUG "capi_signal: DATA_B3_IND %u len=%d\n", 623 datahandle, skb->len-CAPIMSG_LEN(skb->data));
655 datahandle, skb->len-CAPIMSG_LEN(skb->data));
656#endif
657 skb_queue_tail(&mp->inqueue, skb); 624 skb_queue_tail(&mp->inqueue, skb);
658 625
659 handle_minor_recv(mp); 626 handle_minor_recv(mp);
@@ -661,11 +628,9 @@ static void capi_recv_message(struct capi20_appl *ap, struct sk_buff *skb)
661 } else if (CAPIMSG_SUBCOMMAND(skb->data) == CAPI_CONF) { 628 } else if (CAPIMSG_SUBCOMMAND(skb->data) == CAPI_CONF) {
662 629
663 datahandle = CAPIMSG_U16(skb->data, CAPIMSG_BASELEN+4); 630 datahandle = CAPIMSG_U16(skb->data, CAPIMSG_BASELEN+4);
664#ifdef _DEBUG_DATAFLOW 631 pr_debug("capi_signal: DATA_B3_CONF %u 0x%x\n",
665 printk(KERN_DEBUG "capi_signal: DATA_B3_CONF %u 0x%x\n", 632 datahandle,
666 datahandle, 633 CAPIMSG_U16(skb->data, CAPIMSG_BASELEN+4+2));
667 CAPIMSG_U16(skb->data, CAPIMSG_BASELEN+4+2));
668#endif
669 kfree_skb(skb); 634 kfree_skb(skb);
670 capiminor_del_ack(mp, datahandle); 635 capiminor_del_ack(mp, datahandle);
671 tty = tty_port_tty_get(&mp->port); 636 tty = tty_port_tty_get(&mp->port);
@@ -1095,9 +1060,7 @@ static int capinc_tty_write(struct tty_struct *tty,
1095 struct capiminor *mp = tty->driver_data; 1060 struct capiminor *mp = tty->driver_data;
1096 struct sk_buff *skb; 1061 struct sk_buff *skb;
1097 1062
1098#ifdef _DEBUG_TTYFUNCS 1063 pr_debug("capinc_tty_write(count=%d)\n", count);
1099 printk(KERN_DEBUG "capinc_tty_write(count=%d)\n", count);
1100#endif
1101 1064
1102 spin_lock_bh(&mp->outlock); 1065 spin_lock_bh(&mp->outlock);
1103 skb = mp->outskb; 1066 skb = mp->outskb;
@@ -1133,9 +1096,7 @@ static int capinc_tty_put_char(struct tty_struct *tty, unsigned char ch)
1133 struct sk_buff *skb; 1096 struct sk_buff *skb;
1134 int ret = 1; 1097 int ret = 1;
1135 1098
1136#ifdef _DEBUG_TTYFUNCS 1099 pr_debug("capinc_put_char(%u)\n", ch);
1137 printk(KERN_DEBUG "capinc_put_char(%u)\n", ch);
1138#endif
1139 1100
1140 spin_lock_bh(&mp->outlock); 1101 spin_lock_bh(&mp->outlock);
1141 skb = mp->outskb; 1102 skb = mp->outskb;
@@ -1174,9 +1135,7 @@ static void capinc_tty_flush_chars(struct tty_struct *tty)
1174 struct capiminor *mp = tty->driver_data; 1135 struct capiminor *mp = tty->driver_data;
1175 struct sk_buff *skb; 1136 struct sk_buff *skb;
1176 1137
1177#ifdef _DEBUG_TTYFUNCS 1138 pr_debug("capinc_tty_flush_chars\n");
1178 printk(KERN_DEBUG "capinc_tty_flush_chars\n");
1179#endif
1180 1139
1181 spin_lock_bh(&mp->outlock); 1140 spin_lock_bh(&mp->outlock);
1182 skb = mp->outskb; 1141 skb = mp->outskb;
@@ -1200,9 +1159,7 @@ static int capinc_tty_write_room(struct tty_struct *tty)
1200 1159
1201 room = CAPINC_MAX_SENDQUEUE-skb_queue_len(&mp->outqueue); 1160 room = CAPINC_MAX_SENDQUEUE-skb_queue_len(&mp->outqueue);
1202 room *= CAPI_MAX_BLKSIZE; 1161 room *= CAPI_MAX_BLKSIZE;
1203#ifdef _DEBUG_TTYFUNCS 1162 pr_debug("capinc_tty_write_room = %d\n", room);
1204 printk(KERN_DEBUG "capinc_tty_write_room = %d\n", room);
1205#endif
1206 return room; 1163 return room;
1207} 1164}
1208 1165
@@ -1210,12 +1167,10 @@ static int capinc_tty_chars_in_buffer(struct tty_struct *tty)
1210{ 1167{
1211 struct capiminor *mp = tty->driver_data; 1168 struct capiminor *mp = tty->driver_data;
1212 1169
1213#ifdef _DEBUG_TTYFUNCS 1170 pr_debug("capinc_tty_chars_in_buffer = %d nack=%d sq=%d rq=%d\n",
1214 printk(KERN_DEBUG "capinc_tty_chars_in_buffer = %d nack=%d sq=%d rq=%d\n", 1171 mp->outbytes, mp->nack,
1215 mp->outbytes, mp->nack, 1172 skb_queue_len(&mp->outqueue),
1216 skb_queue_len(&mp->outqueue), 1173 skb_queue_len(&mp->inqueue));
1217 skb_queue_len(&mp->inqueue));
1218#endif
1219 return mp->outbytes; 1174 return mp->outbytes;
1220} 1175}
1221 1176
@@ -1227,17 +1182,13 @@ static int capinc_tty_ioctl(struct tty_struct *tty,
1227 1182
1228static void capinc_tty_set_termios(struct tty_struct *tty, struct ktermios * old) 1183static void capinc_tty_set_termios(struct tty_struct *tty, struct ktermios * old)
1229{ 1184{
1230#ifdef _DEBUG_TTYFUNCS 1185 pr_debug("capinc_tty_set_termios\n");
1231 printk(KERN_DEBUG "capinc_tty_set_termios\n");
1232#endif
1233} 1186}
1234 1187
1235static void capinc_tty_throttle(struct tty_struct *tty) 1188static void capinc_tty_throttle(struct tty_struct *tty)
1236{ 1189{
1237 struct capiminor *mp = tty->driver_data; 1190 struct capiminor *mp = tty->driver_data;
1238#ifdef _DEBUG_TTYFUNCS 1191 pr_debug("capinc_tty_throttle\n");
1239 printk(KERN_DEBUG "capinc_tty_throttle\n");
1240#endif
1241 mp->ttyinstop = 1; 1192 mp->ttyinstop = 1;
1242} 1193}
1243 1194
@@ -1245,9 +1196,7 @@ static void capinc_tty_unthrottle(struct tty_struct *tty)
1245{ 1196{
1246 struct capiminor *mp = tty->driver_data; 1197 struct capiminor *mp = tty->driver_data;
1247 1198
1248#ifdef _DEBUG_TTYFUNCS 1199 pr_debug("capinc_tty_unthrottle\n");
1249 printk(KERN_DEBUG "capinc_tty_unthrottle\n");
1250#endif
1251 mp->ttyinstop = 0; 1200 mp->ttyinstop = 0;
1252 handle_minor_recv(mp); 1201 handle_minor_recv(mp);
1253} 1202}
@@ -1256,9 +1205,7 @@ static void capinc_tty_stop(struct tty_struct *tty)
1256{ 1205{
1257 struct capiminor *mp = tty->driver_data; 1206 struct capiminor *mp = tty->driver_data;
1258 1207
1259#ifdef _DEBUG_TTYFUNCS 1208 pr_debug("capinc_tty_stop\n");
1260 printk(KERN_DEBUG "capinc_tty_stop\n");
1261#endif
1262 mp->ttyoutstop = 1; 1209 mp->ttyoutstop = 1;
1263} 1210}
1264 1211
@@ -1266,9 +1213,7 @@ static void capinc_tty_start(struct tty_struct *tty)
1266{ 1213{
1267 struct capiminor *mp = tty->driver_data; 1214 struct capiminor *mp = tty->driver_data;
1268 1215
1269#ifdef _DEBUG_TTYFUNCS 1216 pr_debug("capinc_tty_start\n");
1270 printk(KERN_DEBUG "capinc_tty_start\n");
1271#endif
1272 mp->ttyoutstop = 0; 1217 mp->ttyoutstop = 0;
1273 handle_minor_send(mp); 1218 handle_minor_send(mp);
1274} 1219}
@@ -1277,39 +1222,29 @@ static void capinc_tty_hangup(struct tty_struct *tty)
1277{ 1222{
1278 struct capiminor *mp = tty->driver_data; 1223 struct capiminor *mp = tty->driver_data;
1279 1224
1280#ifdef _DEBUG_TTYFUNCS 1225 pr_debug("capinc_tty_hangup\n");
1281 printk(KERN_DEBUG "capinc_tty_hangup\n");
1282#endif
1283 tty_port_hangup(&mp->port); 1226 tty_port_hangup(&mp->port);
1284} 1227}
1285 1228
1286static int capinc_tty_break_ctl(struct tty_struct *tty, int state) 1229static int capinc_tty_break_ctl(struct tty_struct *tty, int state)
1287{ 1230{
1288#ifdef _DEBUG_TTYFUNCS 1231 pr_debug("capinc_tty_break_ctl(%d)\n", state);
1289 printk(KERN_DEBUG "capinc_tty_break_ctl(%d)\n", state);
1290#endif
1291 return 0; 1232 return 0;
1292} 1233}
1293 1234
1294static void capinc_tty_flush_buffer(struct tty_struct *tty) 1235static void capinc_tty_flush_buffer(struct tty_struct *tty)
1295{ 1236{
1296#ifdef _DEBUG_TTYFUNCS 1237 pr_debug("capinc_tty_flush_buffer\n");
1297 printk(KERN_DEBUG "capinc_tty_flush_buffer\n");
1298#endif
1299} 1238}
1300 1239
1301static void capinc_tty_set_ldisc(struct tty_struct *tty) 1240static void capinc_tty_set_ldisc(struct tty_struct *tty)
1302{ 1241{
1303#ifdef _DEBUG_TTYFUNCS 1242 pr_debug("capinc_tty_set_ldisc\n");
1304 printk(KERN_DEBUG "capinc_tty_set_ldisc\n");
1305#endif
1306} 1243}
1307 1244
1308static void capinc_tty_send_xchar(struct tty_struct *tty, char ch) 1245static void capinc_tty_send_xchar(struct tty_struct *tty, char ch)
1309{ 1246{
1310#ifdef _DEBUG_TTYFUNCS 1247 pr_debug("capinc_tty_send_xchar(%d)\n", ch);
1311 printk(KERN_DEBUG "capinc_tty_send_xchar(%d)\n", ch);
1312#endif
1313} 1248}
1314 1249
1315static const struct tty_operations capinc_ops = { 1250static const struct tty_operations capinc_ops = {
@@ -1514,10 +1449,8 @@ static int __init capi_init(void)
1514 1449
1515 proc_init(); 1450 proc_init();
1516 1451
1517#if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE) 1452#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
1518 compileinfo = " (middleware+capifs)"; 1453 compileinfo = " (middleware)";
1519#elif defined(CONFIG_ISDN_CAPI_MIDDLEWARE)
1520 compileinfo = " (no capifs)";
1521#else 1454#else
1522 compileinfo = " (no middleware)"; 1455 compileinfo = " (no middleware)";
1523#endif 1456#endif
diff --git a/drivers/isdn/capi/capifs.c b/drivers/isdn/capi/capifs.c
deleted file mode 100644
index b4faed7fe0d3..000000000000
--- a/drivers/isdn/capi/capifs.c
+++ /dev/null
@@ -1,239 +0,0 @@
1/* $Id: capifs.c,v 1.1.2.3 2004/01/16 21:09:26 keil Exp $
2 *
3 * Copyright 2000 by Carsten Paeth <calle@calle.de>
4 *
5 * Heavily based on devpts filesystem from H. Peter Anvin
6 *
7 * This software may be used and distributed according to the terms
8 * of the GNU General Public License, incorporated herein by reference.
9 *
10 */
11
12#include <linux/fs.h>
13#include <linux/mount.h>
14#include <linux/slab.h>
15#include <linux/namei.h>
16#include <linux/module.h>
17#include <linux/init.h>
18#include <linux/ctype.h>
19#include <linux/sched.h> /* current */
20
21#include "capifs.h"
22
23MODULE_DESCRIPTION("CAPI4Linux: /dev/capi/ filesystem");
24MODULE_AUTHOR("Carsten Paeth");
25MODULE_LICENSE("GPL");
26
27/* ------------------------------------------------------------------ */
28
29#define CAPIFS_SUPER_MAGIC (('C'<<8)|'N')
30
31static struct vfsmount *capifs_mnt;
32static int capifs_mnt_count;
33
34static struct {
35 int setuid;
36 int setgid;
37 uid_t uid;
38 gid_t gid;
39 umode_t mode;
40} config = {.mode = 0600};
41
42/* ------------------------------------------------------------------ */
43
44static int capifs_remount(struct super_block *s, int *flags, char *data)
45{
46 int setuid = 0;
47 int setgid = 0;
48 uid_t uid = 0;
49 gid_t gid = 0;
50 umode_t mode = 0600;
51 char *this_char;
52 char *new_opt = kstrdup(data, GFP_KERNEL);
53
54 this_char = NULL;
55 while ((this_char = strsep(&data, ",")) != NULL) {
56 int n;
57 char dummy;
58 if (!*this_char)
59 continue;
60 if (sscanf(this_char, "uid=%i%c", &n, &dummy) == 1) {
61 setuid = 1;
62 uid = n;
63 } else if (sscanf(this_char, "gid=%i%c", &n, &dummy) == 1) {
64 setgid = 1;
65 gid = n;
66 } else if (sscanf(this_char, "mode=%o%c", &n, &dummy) == 1)
67 mode = n & ~S_IFMT;
68 else {
69 kfree(new_opt);
70 printk("capifs: called with bogus options\n");
71 return -EINVAL;
72 }
73 }
74
75 mutex_lock(&s->s_root->d_inode->i_mutex);
76
77 replace_mount_options(s, new_opt);
78 config.setuid = setuid;
79 config.setgid = setgid;
80 config.uid = uid;
81 config.gid = gid;
82 config.mode = mode;
83
84 mutex_unlock(&s->s_root->d_inode->i_mutex);
85
86 return 0;
87}
88
89static const struct super_operations capifs_sops =
90{
91 .statfs = simple_statfs,
92 .remount_fs = capifs_remount,
93 .show_options = generic_show_options,
94};
95
96
97static int
98capifs_fill_super(struct super_block *s, void *data, int silent)
99{
100 struct inode * inode;
101
102 s->s_blocksize = 1024;
103 s->s_blocksize_bits = 10;
104 s->s_magic = CAPIFS_SUPER_MAGIC;
105 s->s_op = &capifs_sops;
106 s->s_time_gran = 1;
107
108 inode = new_inode(s);
109 if (!inode)
110 goto fail;
111 inode->i_ino = 1;
112 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
113 inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR;
114 inode->i_op = &simple_dir_inode_operations;
115 inode->i_fop = &simple_dir_operations;
116 inode->i_nlink = 2;
117
118 s->s_root = d_alloc_root(inode);
119 if (s->s_root)
120 return 0;
121
122 printk("capifs: get root dentry failed\n");
123 iput(inode);
124fail:
125 return -ENOMEM;
126}
127
128static struct dentry *capifs_mount(struct file_system_type *fs_type,
129 int flags, const char *dev_name, void *data)
130{
131 return mount_single(fs_type, flags, data, capifs_fill_super);
132}
133
134static struct file_system_type capifs_fs_type = {
135 .owner = THIS_MODULE,
136 .name = "capifs",
137 .mount = capifs_mount,
138 .kill_sb = kill_anon_super,
139};
140
141static struct dentry *new_ncci(unsigned int number, dev_t device)
142{
143 struct super_block *s = capifs_mnt->mnt_sb;
144 struct dentry *root = s->s_root;
145 struct dentry *dentry;
146 struct inode *inode;
147 char name[10];
148 int namelen;
149
150 mutex_lock(&root->d_inode->i_mutex);
151
152 namelen = sprintf(name, "%d", number);
153 dentry = lookup_one_len(name, root, namelen);
154 if (IS_ERR(dentry)) {
155 dentry = NULL;
156 goto unlock_out;
157 }
158
159 if (dentry->d_inode) {
160 dput(dentry);
161 dentry = NULL;
162 goto unlock_out;
163 }
164
165 inode = new_inode(s);
166 if (!inode) {
167 dput(dentry);
168 dentry = NULL;
169 goto unlock_out;
170 }
171
172 /* config contents is protected by root's i_mutex */
173 inode->i_uid = config.setuid ? config.uid : current_fsuid();
174 inode->i_gid = config.setgid ? config.gid : current_fsgid();
175 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
176 inode->i_ino = number + 2;
177 init_special_inode(inode, S_IFCHR|config.mode, device);
178
179 d_instantiate(dentry, inode);
180 dget(dentry);
181
182unlock_out:
183 mutex_unlock(&root->d_inode->i_mutex);
184
185 return dentry;
186}
187
188struct dentry *capifs_new_ncci(unsigned int number, dev_t device)
189{
190 struct dentry *dentry;
191
192 if (simple_pin_fs(&capifs_fs_type, &capifs_mnt, &capifs_mnt_count) < 0)
193 return NULL;
194
195 dentry = new_ncci(number, device);
196 if (!dentry)
197 simple_release_fs(&capifs_mnt, &capifs_mnt_count);
198
199 return dentry;
200}
201
202void capifs_free_ncci(struct dentry *dentry)
203{
204 struct dentry *root = capifs_mnt->mnt_sb->s_root;
205 struct inode *inode;
206
207 if (!dentry)
208 return;
209
210 mutex_lock(&root->d_inode->i_mutex);
211
212 inode = dentry->d_inode;
213 if (inode) {
214 drop_nlink(inode);
215 d_delete(dentry);
216 dput(dentry);
217 }
218 dput(dentry);
219
220 mutex_unlock(&root->d_inode->i_mutex);
221
222 simple_release_fs(&capifs_mnt, &capifs_mnt_count);
223}
224
225static int __init capifs_init(void)
226{
227 return register_filesystem(&capifs_fs_type);
228}
229
230static void __exit capifs_exit(void)
231{
232 unregister_filesystem(&capifs_fs_type);
233}
234
235EXPORT_SYMBOL(capifs_new_ncci);
236EXPORT_SYMBOL(capifs_free_ncci);
237
238module_init(capifs_init);
239module_exit(capifs_exit);
diff --git a/drivers/isdn/capi/capifs.h b/drivers/isdn/capi/capifs.h
deleted file mode 100644
index e193d1189531..000000000000
--- a/drivers/isdn/capi/capifs.h
+++ /dev/null
@@ -1,28 +0,0 @@
1/* $Id: capifs.h,v 1.1.2.2 2004/01/16 21:09:26 keil Exp $
2 *
3 * Copyright 2000 by Carsten Paeth <calle@calle.de>
4 *
5 * This software may be used and distributed according to the terms
6 * of the GNU General Public License, incorporated herein by reference.
7 *
8 */
9
10#include <linux/dcache.h>
11
12#if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE)
13
14struct dentry *capifs_new_ncci(unsigned int num, dev_t device);
15void capifs_free_ncci(struct dentry *dentry);
16
17#else
18
19static inline struct dentry *capifs_new_ncci(unsigned int num, dev_t device)
20{
21 return NULL;
22}
23
24static inline void capifs_free_ncci(struct dentry *dentry)
25{
26}
27
28#endif
diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c
index 8a3c5cfc4fea..3913f47ef86d 100644
--- a/drivers/isdn/gigaset/bas-gigaset.c
+++ b/drivers/isdn/gigaset/bas-gigaset.c
@@ -1157,7 +1157,6 @@ static void write_iso_tasklet(unsigned long data)
1157 struct urb *urb; 1157 struct urb *urb;
1158 int status; 1158 int status;
1159 struct usb_iso_packet_descriptor *ifd; 1159 struct usb_iso_packet_descriptor *ifd;
1160 int offset;
1161 unsigned long flags; 1160 unsigned long flags;
1162 int i; 1161 int i;
1163 struct sk_buff *skb; 1162 struct sk_buff *skb;
@@ -1225,7 +1224,6 @@ static void write_iso_tasklet(unsigned long data)
1225 * successfully sent 1224 * successfully sent
1226 * - all following frames are not sent at all 1225 * - all following frames are not sent at all
1227 */ 1226 */
1228 offset = done->limit; /* default (no error) */
1229 for (i = 0; i < BAS_NUMFRAMES; i++) { 1227 for (i = 0; i < BAS_NUMFRAMES; i++) {
1230 ifd = &urb->iso_frame_desc[i]; 1228 ifd = &urb->iso_frame_desc[i];
1231 if (ifd->status || 1229 if (ifd->status ||
@@ -1235,9 +1233,6 @@ static void write_iso_tasklet(unsigned long data)
1235 i, ifd->actual_length, 1233 i, ifd->actual_length,
1236 ifd->length, 1234 ifd->length,
1237 get_usb_statmsg(ifd->status)); 1235 get_usb_statmsg(ifd->status));
1238 offset = (ifd->offset +
1239 ifd->actual_length)
1240 % BAS_OUTBUFSIZE;
1241 break; 1236 break;
1242 } 1237 }
1243 } 1238 }
diff --git a/drivers/isdn/gigaset/ev-layer.c b/drivers/isdn/gigaset/ev-layer.c
index a14187605f5e..ba74646cf0e4 100644
--- a/drivers/isdn/gigaset/ev-layer.c
+++ b/drivers/isdn/gigaset/ev-layer.c
@@ -390,12 +390,12 @@ static const struct zsau_resp_t {
390 */ 390 */
391static int cid_of_response(char *s) 391static int cid_of_response(char *s)
392{ 392{
393 unsigned long cid; 393 int cid;
394 int rc; 394 int rc;
395 395
396 if (s[-1] != ';') 396 if (s[-1] != ';')
397 return 0; /* no CID separator */ 397 return 0; /* no CID separator */
398 rc = strict_strtoul(s, 10, &cid); 398 rc = kstrtoint(s, 10, &cid);
399 if (rc) 399 if (rc)
400 return 0; /* CID not numeric */ 400 return 0; /* CID not numeric */
401 if (cid < 1 || cid > 65535) 401 if (cid < 1 || cid > 65535)
@@ -566,27 +566,19 @@ void gigaset_handle_modem_response(struct cardstate *cs)
566 case RT_ZCAU: 566 case RT_ZCAU:
567 event->parameter = -1; 567 event->parameter = -1;
568 if (curarg + 1 < params) { 568 if (curarg + 1 < params) {
569 unsigned long type, value; 569 u8 type, value;
570
571 i = strict_strtoul(argv[curarg++], 16, &type);
572 j = strict_strtoul(argv[curarg++], 16, &value);
573 570
574 if (i == 0 && type < 256 && 571 i = kstrtou8(argv[curarg++], 16, &type);
575 j == 0 && value < 256) 572 j = kstrtou8(argv[curarg++], 16, &value);
573 if (i == 0 && j == 0)
576 event->parameter = (type << 8) | value; 574 event->parameter = (type << 8) | value;
577 } else 575 } else
578 curarg = params - 1; 576 curarg = params - 1;
579 break; 577 break;
580 case RT_NUMBER: 578 case RT_NUMBER:
581 event->parameter = -1; 579 if (curarg >= params ||
582 if (curarg < params) { 580 kstrtoint(argv[curarg++], 10, &event->parameter))
583 unsigned long res; 581 event->parameter = -1;
584 int rc;
585
586 rc = strict_strtoul(argv[curarg++], 10, &res);
587 if (rc == 0)
588 event->parameter = res;
589 }
590 gig_dbg(DEBUG_EVENT, "parameter==%d", event->parameter); 582 gig_dbg(DEBUG_EVENT, "parameter==%d", event->parameter);
591 break; 583 break;
592 } 584 }
diff --git a/drivers/isdn/gigaset/ser-gigaset.c b/drivers/isdn/gigaset/ser-gigaset.c
index 86a5c4f7775e..1d44d470897c 100644
--- a/drivers/isdn/gigaset/ser-gigaset.c
+++ b/drivers/isdn/gigaset/ser-gigaset.c
@@ -674,7 +674,7 @@ gigaset_tty_ioctl(struct tty_struct *tty, struct file *file,
674 * cflags buffer containing error flags for received characters (ignored) 674 * cflags buffer containing error flags for received characters (ignored)
675 * count number of received characters 675 * count number of received characters
676 */ 676 */
677static void 677static unsigned int
678gigaset_tty_receive(struct tty_struct *tty, const unsigned char *buf, 678gigaset_tty_receive(struct tty_struct *tty, const unsigned char *buf,
679 char *cflags, int count) 679 char *cflags, int count)
680{ 680{
@@ -683,12 +683,12 @@ gigaset_tty_receive(struct tty_struct *tty, const unsigned char *buf,
683 struct inbuf_t *inbuf; 683 struct inbuf_t *inbuf;
684 684
685 if (!cs) 685 if (!cs)
686 return; 686 return -ENODEV;
687 inbuf = cs->inbuf; 687 inbuf = cs->inbuf;
688 if (!inbuf) { 688 if (!inbuf) {
689 dev_err(cs->dev, "%s: no inbuf\n", __func__); 689 dev_err(cs->dev, "%s: no inbuf\n", __func__);
690 cs_put(cs); 690 cs_put(cs);
691 return; 691 return -EINVAL;
692 } 692 }
693 693
694 tail = inbuf->tail; 694 tail = inbuf->tail;
@@ -725,6 +725,8 @@ gigaset_tty_receive(struct tty_struct *tty, const unsigned char *buf,
725 gig_dbg(DEBUG_INTR, "%s-->BH", __func__); 725 gig_dbg(DEBUG_INTR, "%s-->BH", __func__);
726 gigaset_schedule_event(cs); 726 gigaset_schedule_event(cs);
727 cs_put(cs); 727 cs_put(cs);
728
729 return count;
728} 730}
729 731
730/* 732/*
diff --git a/drivers/isdn/hardware/avm/avm_cs.c b/drivers/isdn/hardware/avm/avm_cs.c
index 91f06a3ef002..61f516f376dc 100644
--- a/drivers/isdn/hardware/avm/avm_cs.c
+++ b/drivers/isdn/hardware/avm/avm_cs.c
@@ -149,7 +149,7 @@ static void avmcs_release(struct pcmcia_device *link)
149} /* avmcs_release */ 149} /* avmcs_release */
150 150
151 151
152static struct pcmcia_device_id avmcs_ids[] = { 152static const struct pcmcia_device_id avmcs_ids[] = {
153 PCMCIA_DEVICE_PROD_ID12("AVM", "ISDN-Controller B1", 0x95d42008, 0x845dc335), 153 PCMCIA_DEVICE_PROD_ID12("AVM", "ISDN-Controller B1", 0x95d42008, 0x845dc335),
154 PCMCIA_DEVICE_PROD_ID12("AVM", "Mobile ISDN-Controller M1", 0x95d42008, 0x81e10430), 154 PCMCIA_DEVICE_PROD_ID12("AVM", "Mobile ISDN-Controller M1", 0x95d42008, 0x81e10430),
155 PCMCIA_DEVICE_PROD_ID12("AVM", "Mobile ISDN-Controller M2", 0x95d42008, 0x18e8558a), 155 PCMCIA_DEVICE_PROD_ID12("AVM", "Mobile ISDN-Controller M2", 0x95d42008, 0x18e8558a),
diff --git a/drivers/isdn/hardware/eicon/debug.c b/drivers/isdn/hardware/eicon/debug.c
index 362640120886..7a9894cb4557 100644
--- a/drivers/isdn/hardware/eicon/debug.c
+++ b/drivers/isdn/hardware/eicon/debug.c
@@ -861,7 +861,7 @@ static int diva_get_idi_adapter_info (IDI_CALL request, dword* serial, dword* lo
861void diva_mnt_add_xdi_adapter (const DESCRIPTOR* d) { 861void diva_mnt_add_xdi_adapter (const DESCRIPTOR* d) {
862 diva_os_spin_lock_magic_t old_irql, old_irql1; 862 diva_os_spin_lock_magic_t old_irql, old_irql1;
863 dword sec, usec, logical, serial, org_mask; 863 dword sec, usec, logical, serial, org_mask;
864 int id, best_id = 0, free_id = -1; 864 int id, free_id = -1;
865 char tmp[128]; 865 char tmp[128];
866 diva_dbg_entry_head_t* pmsg = NULL; 866 diva_dbg_entry_head_t* pmsg = NULL;
867 int len; 867 int len;
@@ -906,7 +906,6 @@ void diva_mnt_add_xdi_adapter (const DESCRIPTOR* d) {
906 and slot is still free - reuse it 906 and slot is still free - reuse it
907 */ 907 */
908 free_id = id; 908 free_id = id;
909 best_id = 1;
910 break; 909 break;
911 } 910 }
912 } 911 }
diff --git a/drivers/isdn/hardware/eicon/divacapi.h b/drivers/isdn/hardware/eicon/divacapi.h
index 9f5b68037a26..e330da0c5fc0 100644
--- a/drivers/isdn/hardware/eicon/divacapi.h
+++ b/drivers/isdn/hardware/eicon/divacapi.h
@@ -673,7 +673,7 @@ struct async_s {
673 673
674 674
675/*------------------------------------------------------------------*/ 675/*------------------------------------------------------------------*/
676/* auxilliary states for supplementary services */ 676/* auxiliary states for supplementary services */
677/*------------------------------------------------------------------*/ 677/*------------------------------------------------------------------*/
678 678
679#define IDLE 0 679#define IDLE 0
diff --git a/drivers/isdn/hardware/eicon/io.h b/drivers/isdn/hardware/eicon/io.h
index 0c6c650d76bb..a6f175596364 100644
--- a/drivers/isdn/hardware/eicon/io.h
+++ b/drivers/isdn/hardware/eicon/io.h
@@ -60,7 +60,7 @@ typedef struct _diva_xdi_capi_cfg {
60 -------------------------------------------------------------------------- */ 60 -------------------------------------------------------------------------- */
61struct _ISDN_ADAPTER { 61struct _ISDN_ADAPTER {
62 void (* DIRequest)(PISDN_ADAPTER, ENTITY *) ; 62 void (* DIRequest)(PISDN_ADAPTER, ENTITY *) ;
63 int State ; /* from NT4 1.srv, a good idea, but a poor achievment */ 63 int State ; /* from NT4 1.srv, a good idea, but a poor achievement */
64 int Initialized ; 64 int Initialized ;
65 int RegisteredWithDidd ; 65 int RegisteredWithDidd ;
66 int Unavailable ; /* callback function possible? */ 66 int Unavailable ; /* callback function possible? */
diff --git a/drivers/isdn/hardware/eicon/message.c b/drivers/isdn/hardware/eicon/message.c
index 341ef17c22ac..a3395986df3d 100644
--- a/drivers/isdn/hardware/eicon/message.c
+++ b/drivers/isdn/hardware/eicon/message.c
@@ -1198,7 +1198,6 @@ static byte connect_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
1198 word ch; 1198 word ch;
1199 word i; 1199 word i;
1200 word Info; 1200 word Info;
1201 word CIP;
1202 byte LinkLayer; 1201 byte LinkLayer;
1203 API_PARSE * ai; 1202 API_PARSE * ai;
1204 API_PARSE * bp; 1203 API_PARSE * bp;
@@ -1340,7 +1339,6 @@ static byte connect_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
1340 add_s(plci,BC,&parms[6]); 1339 add_s(plci,BC,&parms[6]);
1341 add_s(plci,LLC,&parms[7]); 1340 add_s(plci,LLC,&parms[7]);
1342 add_s(plci,HLC,&parms[8]); 1341 add_s(plci,HLC,&parms[8]);
1343 CIP = GET_WORD(parms[0].info);
1344 if (a->Info_Mask[appl->Id-1] & 0x200) 1342 if (a->Info_Mask[appl->Id-1] & 0x200)
1345 { 1343 {
1346 /* early B3 connect (CIP mask bit 9) no release after a disc */ 1344 /* early B3 connect (CIP mask bit 9) no release after a disc */
@@ -2639,7 +2637,7 @@ static byte connect_b3_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
2639 } 2637 }
2640 else 2638 else
2641 { 2639 {
2642 /* local reply if assign unsuccessfull 2640 /* local reply if assign unsuccessful
2643 or B3 protocol allows only one layer 3 connection 2641 or B3 protocol allows only one layer 3 connection
2644 and already connected 2642 and already connected
2645 or B2 protocol not any LAPD 2643 or B2 protocol not any LAPD
@@ -4830,7 +4828,6 @@ static void sig_ind(PLCI *plci)
4830 dword x_Id; 4828 dword x_Id;
4831 dword Id; 4829 dword Id;
4832 dword rId; 4830 dword rId;
4833 word Number = 0;
4834 word i; 4831 word i;
4835 word cip; 4832 word cip;
4836 dword cip_mask; 4833 dword cip_mask;
@@ -5106,7 +5103,7 @@ static void sig_ind(PLCI *plci)
5106 } 5103 }
5107 } 5104 }
5108 5105
5109 if(plci->appl) Number = plci->appl->Number++; 5106 if(plci->appl) plci->appl->Number++;
5110 5107
5111 switch(plci->Sig.Ind) { 5108 switch(plci->Sig.Ind) {
5112 /* Response to Get_Supported_Services request */ 5109 /* Response to Get_Supported_Services request */
@@ -5894,7 +5891,6 @@ static void sig_ind(PLCI *plci)
5894 break; 5891 break;
5895 5892
5896 case TEL_CTRL: 5893 case TEL_CTRL:
5897 Number = 0;
5898 ie = multi_fac_parms[0]; /* inspect the facility hook indications */ 5894 ie = multi_fac_parms[0]; /* inspect the facility hook indications */
5899 if(plci->State==ADVANCED_VOICE_SIG && ie[0]){ 5895 if(plci->State==ADVANCED_VOICE_SIG && ie[0]){
5900 switch (ie[1]&0x91) { 5896 switch (ie[1]&0x91) {
@@ -8189,7 +8185,7 @@ static word add_b23(PLCI *plci, API_PARSE *bp)
8189 dlc[ 0] = 15; 8185 dlc[ 0] = 15;
8190 if(b2_config->length >= 8) { /* PIAFS control abilities */ 8186 if(b2_config->length >= 8) { /* PIAFS control abilities */
8191 dlc[ 7] = 10; 8187 dlc[ 7] = 10;
8192 dlc[16] = 2; /* Length of PIAFS extention */ 8188 dlc[16] = 2; /* Length of PIAFS extension */
8193 dlc[17] = PIAFS_UDATA_ABILITIES; /* control (UDATA) ability */ 8189 dlc[17] = PIAFS_UDATA_ABILITIES; /* control (UDATA) ability */
8194 dlc[18] = b2_config_parms[4].info[0]; /* value */ 8190 dlc[18] = b2_config_parms[4].info[0]; /* value */
8195 dlc[ 0] = 18; 8191 dlc[ 0] = 18;
@@ -10119,14 +10115,12 @@ static byte dtmf_request (dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI
10119 10115
10120static void dtmf_confirmation (dword Id, PLCI *plci) 10116static void dtmf_confirmation (dword Id, PLCI *plci)
10121{ 10117{
10122 word Info;
10123 word i; 10118 word i;
10124 byte result[4]; 10119 byte result[4];
10125 10120
10126 dbug (1, dprintf ("[%06lx] %s,%d: dtmf_confirmation", 10121 dbug (1, dprintf ("[%06lx] %s,%d: dtmf_confirmation",
10127 UnMapId (Id), (char *)(FILE_), __LINE__)); 10122 UnMapId (Id), (char *)(FILE_), __LINE__));
10128 10123
10129 Info = GOOD;
10130 result[0] = 2; 10124 result[0] = 2;
10131 PUT_WORD (&result[1], DTMF_SUCCESS); 10125 PUT_WORD (&result[1], DTMF_SUCCESS);
10132 if (plci->dtmf_send_requests != 0) 10126 if (plci->dtmf_send_requests != 0)
@@ -11520,13 +11514,12 @@ static word mixer_restore_config (dword Id, PLCI *plci, byte Rc)
11520static void mixer_command (dword Id, PLCI *plci, byte Rc) 11514static void mixer_command (dword Id, PLCI *plci, byte Rc)
11521{ 11515{
11522 DIVA_CAPI_ADAPTER *a; 11516 DIVA_CAPI_ADAPTER *a;
11523 word i, internal_command, Info; 11517 word i, internal_command;
11524 11518
11525 dbug (1, dprintf ("[%06lx] %s,%d: mixer_command %02x %04x %04x", 11519 dbug (1, dprintf ("[%06lx] %s,%d: mixer_command %02x %04x %04x",
11526 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->internal_command, 11520 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->internal_command,
11527 plci->li_cmd)); 11521 plci->li_cmd));
11528 11522
11529 Info = GOOD;
11530 a = plci->adapter; 11523 a = plci->adapter;
11531 internal_command = plci->internal_command; 11524 internal_command = plci->internal_command;
11532 plci->internal_command = 0; 11525 plci->internal_command = 0;
@@ -11550,7 +11543,6 @@ static void mixer_command (dword Id, PLCI *plci, byte Rc)
11550 { 11543 {
11551 dbug (1, dprintf ("[%06lx] %s,%d: Load mixer failed", 11544 dbug (1, dprintf ("[%06lx] %s,%d: Load mixer failed",
11552 UnMapId (Id), (char *)(FILE_), __LINE__)); 11545 UnMapId (Id), (char *)(FILE_), __LINE__));
11553 Info = _FACILITY_NOT_SUPPORTED;
11554 break; 11546 break;
11555 } 11547 }
11556 if (plci->internal_command) 11548 if (plci->internal_command)
@@ -11592,7 +11584,6 @@ static void mixer_command (dword Id, PLCI *plci, byte Rc)
11592 } while ((plci->li_plci_b_write_pos != plci->li_plci_b_req_pos) 11584 } while ((plci->li_plci_b_write_pos != plci->li_plci_b_req_pos)
11593 && !(plci->li_plci_b_queue[i] & LI_PLCI_B_LAST_FLAG)); 11585 && !(plci->li_plci_b_queue[i] & LI_PLCI_B_LAST_FLAG));
11594 } 11586 }
11595 Info = _FACILITY_NOT_SUPPORTED;
11596 break; 11587 break;
11597 } 11588 }
11598 if (plci->internal_command) 11589 if (plci->internal_command)
@@ -11610,7 +11601,6 @@ static void mixer_command (dword Id, PLCI *plci, byte Rc)
11610 { 11601 {
11611 dbug (1, dprintf ("[%06lx] %s,%d: Unload mixer failed", 11602 dbug (1, dprintf ("[%06lx] %s,%d: Unload mixer failed",
11612 UnMapId (Id), (char *)(FILE_), __LINE__)); 11603 UnMapId (Id), (char *)(FILE_), __LINE__));
11613 Info = _FACILITY_NOT_SUPPORTED;
11614 break; 11604 break;
11615 } 11605 }
11616 if (plci->internal_command) 11606 if (plci->internal_command)
@@ -12448,13 +12438,11 @@ static byte mixer_request (dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI
12448static void mixer_indication_coefs_set (dword Id, PLCI *plci) 12438static void mixer_indication_coefs_set (dword Id, PLCI *plci)
12449{ 12439{
12450 dword d; 12440 dword d;
12451 DIVA_CAPI_ADAPTER *a;
12452 byte result[12]; 12441 byte result[12];
12453 12442
12454 dbug (1, dprintf ("[%06lx] %s,%d: mixer_indication_coefs_set", 12443 dbug (1, dprintf ("[%06lx] %s,%d: mixer_indication_coefs_set",
12455 UnMapId (Id), (char *)(FILE_), __LINE__)); 12444 UnMapId (Id), (char *)(FILE_), __LINE__));
12456 12445
12457 a = plci->adapter;
12458 if (plci->li_plci_b_read_pos != plci->li_plci_b_req_pos) 12446 if (plci->li_plci_b_read_pos != plci->li_plci_b_req_pos)
12459 { 12447 {
12460 do 12448 do
@@ -14111,13 +14099,11 @@ static void select_b_command (dword Id, PLCI *plci, byte Rc)
14111 14099
14112static void fax_connect_ack_command (dword Id, PLCI *plci, byte Rc) 14100static void fax_connect_ack_command (dword Id, PLCI *plci, byte Rc)
14113{ 14101{
14114 word Info;
14115 word internal_command; 14102 word internal_command;
14116 14103
14117 dbug (1, dprintf ("[%06lx] %s,%d: fax_connect_ack_command %02x %04x", 14104 dbug (1, dprintf ("[%06lx] %s,%d: fax_connect_ack_command %02x %04x",
14118 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->internal_command)); 14105 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->internal_command));
14119 14106
14120 Info = GOOD;
14121 internal_command = plci->internal_command; 14107 internal_command = plci->internal_command;
14122 plci->internal_command = 0; 14108 plci->internal_command = 0;
14123 switch (internal_command) 14109 switch (internal_command)
@@ -14160,13 +14146,11 @@ static void fax_connect_ack_command (dword Id, PLCI *plci, byte Rc)
14160 14146
14161static void fax_edata_ack_command (dword Id, PLCI *plci, byte Rc) 14147static void fax_edata_ack_command (dword Id, PLCI *plci, byte Rc)
14162{ 14148{
14163 word Info;
14164 word internal_command; 14149 word internal_command;
14165 14150
14166 dbug (1, dprintf ("[%06lx] %s,%d: fax_edata_ack_command %02x %04x", 14151 dbug (1, dprintf ("[%06lx] %s,%d: fax_edata_ack_command %02x %04x",
14167 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->internal_command)); 14152 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->internal_command));
14168 14153
14169 Info = GOOD;
14170 internal_command = plci->internal_command; 14154 internal_command = plci->internal_command;
14171 plci->internal_command = 0; 14155 plci->internal_command = 0;
14172 switch (internal_command) 14156 switch (internal_command)
@@ -14395,13 +14379,11 @@ static void rtp_connect_b3_req_command (dword Id, PLCI *plci, byte Rc)
14395 14379
14396static void rtp_connect_b3_res_command (dword Id, PLCI *plci, byte Rc) 14380static void rtp_connect_b3_res_command (dword Id, PLCI *plci, byte Rc)
14397{ 14381{
14398 word Info;
14399 word internal_command; 14382 word internal_command;
14400 14383
14401 dbug (1, dprintf ("[%06lx] %s,%d: rtp_connect_b3_res_command %02x %04x", 14384 dbug (1, dprintf ("[%06lx] %s,%d: rtp_connect_b3_res_command %02x %04x",
14402 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->internal_command)); 14385 UnMapId (Id), (char *)(FILE_), __LINE__, Rc, plci->internal_command));
14403 14386
14404 Info = GOOD;
14405 internal_command = plci->internal_command; 14387 internal_command = plci->internal_command;
14406 plci->internal_command = 0; 14388 plci->internal_command = 0;
14407 switch (internal_command) 14389 switch (internal_command)
@@ -14423,7 +14405,6 @@ static void rtp_connect_b3_res_command (dword Id, PLCI *plci, byte Rc)
14423 { 14405 {
14424 dbug (1, dprintf ("[%06lx] %s,%d: RTP setting connect resp info failed %02x", 14406 dbug (1, dprintf ("[%06lx] %s,%d: RTP setting connect resp info failed %02x",
14425 UnMapId (Id), (char *)(FILE_), __LINE__, Rc)); 14407 UnMapId (Id), (char *)(FILE_), __LINE__, Rc));
14426 Info = _WRONG_STATE;
14427 break; 14408 break;
14428 } 14409 }
14429 if (plci_nl_busy (plci)) 14410 if (plci_nl_busy (plci))
diff --git a/drivers/isdn/hardware/eicon/pc.h b/drivers/isdn/hardware/eicon/pc.h
index 1c6945768a35..bf6b01812400 100644
--- a/drivers/isdn/hardware/eicon/pc.h
+++ b/drivers/isdn/hardware/eicon/pc.h
@@ -701,7 +701,7 @@ Byte | 8 7 6 5 4 3 2 1
701#define PROTCAP_FREE12 0x1000 /* not used */ 701#define PROTCAP_FREE12 0x1000 /* not used */
702#define PROTCAP_FREE13 0x2000 /* not used */ 702#define PROTCAP_FREE13 0x2000 /* not used */
703#define PROTCAP_FREE14 0x4000 /* not used */ 703#define PROTCAP_FREE14 0x4000 /* not used */
704#define PROTCAP_EXTENSION 0x8000 /* used for future extentions */ 704#define PROTCAP_EXTENSION 0x8000 /* used for future extensions */
705/* -----------------------------------------------------------* */ 705/* -----------------------------------------------------------* */
706/* Onhook data transmission ETS30065901 */ 706/* Onhook data transmission ETS30065901 */
707/* Message Type */ 707/* Message Type */
diff --git a/drivers/isdn/hardware/eicon/um_idi.c b/drivers/isdn/hardware/eicon/um_idi.c
index 6563db998d06..ac0bdd1f23fa 100644
--- a/drivers/isdn/hardware/eicon/um_idi.c
+++ b/drivers/isdn/hardware/eicon/um_idi.c
@@ -363,7 +363,7 @@ int diva_um_idi_read(void *entity,
363 363
364 if ((ret = (*cp_fn) (os_handle, dst, data, length)) >= 0) { 364 if ((ret = (*cp_fn) (os_handle, dst, data, length)) >= 0) {
365 /* 365 /*
366 Acknowledge only if read was successfull 366 Acknowledge only if read was successful
367 */ 367 */
368 diva_data_q_ack_segment4read(q); 368 diva_data_q_ack_segment4read(q);
369 } 369 }
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c
index 4e3780d78ac7..f6f3c87cc7c2 100644
--- a/drivers/isdn/hardware/mISDN/hfcmulti.c
+++ b/drivers/isdn/hardware/mISDN/hfcmulti.c
@@ -118,7 +118,7 @@
118 * -> See hfc_multi.h for HFC_IO_MODE_* values 118 * -> See hfc_multi.h for HFC_IO_MODE_* values
119 * By default, the IO mode is pci memory IO (MEMIO). 119 * By default, the IO mode is pci memory IO (MEMIO).
120 * Some cards require specific IO mode, so it cannot be changed. 120 * Some cards require specific IO mode, so it cannot be changed.
121 * It may be usefull to set IO mode to register io (REGIO) to solve 121 * It may be useful to set IO mode to register io (REGIO) to solve
122 * PCI bridge problems. 122 * PCI bridge problems.
123 * If unsure, don't give this parameter. 123 * If unsure, don't give this parameter.
124 * 124 *
@@ -903,7 +903,7 @@ vpm_echocan_off(struct hfc_multi *hc, int ch)
903/* 903/*
904 * Speech Design resync feature 904 * Speech Design resync feature
905 * NOTE: This is called sometimes outside interrupt handler. 905 * NOTE: This is called sometimes outside interrupt handler.
906 * We must lock irqsave, so no other interrupt (other card) will occurr! 906 * We must lock irqsave, so no other interrupt (other card) will occur!
907 * Also multiple interrupts may nest, so must lock each access (lists, card)! 907 * Also multiple interrupts may nest, so must lock each access (lists, card)!
908 */ 908 */
909static inline void 909static inline void
diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c
index 15d323b8be60..b01a7be1300f 100644
--- a/drivers/isdn/hardware/mISDN/hfcpci.c
+++ b/drivers/isdn/hardware/mISDN/hfcpci.c
@@ -272,7 +272,7 @@ reset_hfcpci(struct hfc_pci *hc)
272 * D- and monitor/CI channel are not enabled 272 * D- and monitor/CI channel are not enabled
273 * STIO1 is used as output for data, B1+B2 from ST->IOM+HFC 273 * STIO1 is used as output for data, B1+B2 from ST->IOM+HFC
274 * STIO2 is used as data input, B1+B2 from IOM->ST 274 * STIO2 is used as data input, B1+B2 from IOM->ST
275 * ST B-channel send disabled -> continous 1s 275 * ST B-channel send disabled -> continuous 1s
276 * The IOM slots are always enabled 276 * The IOM slots are always enabled
277 */ 277 */
278 if (test_bit(HFC_CFG_PCM, &hc->cfg)) { 278 if (test_bit(HFC_CFG_PCM, &hc->cfg)) {
@@ -405,7 +405,7 @@ hfcpci_empty_bfifo(struct bchannel *bch, struct bzfifo *bz,
405 u_char *bdata, int count) 405 u_char *bdata, int count)
406{ 406{
407 u_char *ptr, *ptr1, new_f2; 407 u_char *ptr, *ptr1, new_f2;
408 int total, maxlen, new_z2; 408 int maxlen, new_z2;
409 struct zt *zp; 409 struct zt *zp;
410 410
411 if ((bch->debug & DEBUG_HW_BCHANNEL) && !(bch->debug & DEBUG_HW_BFIFO)) 411 if ((bch->debug & DEBUG_HW_BCHANNEL) && !(bch->debug & DEBUG_HW_BFIFO))
@@ -431,7 +431,6 @@ hfcpci_empty_bfifo(struct bchannel *bch, struct bzfifo *bz,
431 printk(KERN_WARNING "HFCPCI: receive out of memory\n"); 431 printk(KERN_WARNING "HFCPCI: receive out of memory\n");
432 return; 432 return;
433 } 433 }
434 total = count;
435 count -= 3; 434 count -= 3;
436 ptr = skb_put(bch->rx_skb, count); 435 ptr = skb_put(bch->rx_skb, count);
437 436
@@ -968,7 +967,6 @@ static void
968ph_state_nt(struct dchannel *dch) 967ph_state_nt(struct dchannel *dch)
969{ 968{
970 struct hfc_pci *hc = dch->hw; 969 struct hfc_pci *hc = dch->hw;
971 u_char val;
972 970
973 if (dch->debug) 971 if (dch->debug)
974 printk(KERN_DEBUG "%s: NT newstate %x\n", 972 printk(KERN_DEBUG "%s: NT newstate %x\n",
@@ -982,7 +980,7 @@ ph_state_nt(struct dchannel *dch)
982 hc->hw.int_m1 &= ~HFCPCI_INTS_TIMER; 980 hc->hw.int_m1 &= ~HFCPCI_INTS_TIMER;
983 Write_hfc(hc, HFCPCI_INT_M1, hc->hw.int_m1); 981 Write_hfc(hc, HFCPCI_INT_M1, hc->hw.int_m1);
984 /* Clear already pending ints */ 982 /* Clear already pending ints */
985 val = Read_hfc(hc, HFCPCI_INT_S1); 983 (void) Read_hfc(hc, HFCPCI_INT_S1);
986 Write_hfc(hc, HFCPCI_STATES, 4 | HFCPCI_LOAD_STATE); 984 Write_hfc(hc, HFCPCI_STATES, 4 | HFCPCI_LOAD_STATE);
987 udelay(10); 985 udelay(10);
988 Write_hfc(hc, HFCPCI_STATES, 4); 986 Write_hfc(hc, HFCPCI_STATES, 4);
diff --git a/drivers/isdn/hardware/mISDN/hfcsusb.c b/drivers/isdn/hardware/mISDN/hfcsusb.c
index 8700474747e8..3ccbff13eaf2 100644
--- a/drivers/isdn/hardware/mISDN/hfcsusb.c
+++ b/drivers/isdn/hardware/mISDN/hfcsusb.c
@@ -118,14 +118,12 @@ static void
118ctrl_complete(struct urb *urb) 118ctrl_complete(struct urb *urb)
119{ 119{
120 struct hfcsusb *hw = (struct hfcsusb *) urb->context; 120 struct hfcsusb *hw = (struct hfcsusb *) urb->context;
121 struct ctrl_buf *buf;
122 121
123 if (debug & DBG_HFC_CALL_TRACE) 122 if (debug & DBG_HFC_CALL_TRACE)
124 printk(KERN_DEBUG "%s: %s\n", hw->name, __func__); 123 printk(KERN_DEBUG "%s: %s\n", hw->name, __func__);
125 124
126 urb->dev = hw->dev; 125 urb->dev = hw->dev;
127 if (hw->ctrl_cnt) { 126 if (hw->ctrl_cnt) {
128 buf = &hw->ctrl_buff[hw->ctrl_out_idx];
129 hw->ctrl_cnt--; /* decrement actual count */ 127 hw->ctrl_cnt--; /* decrement actual count */
130 if (++hw->ctrl_out_idx >= HFC_CTRL_BUFSIZE) 128 if (++hw->ctrl_out_idx >= HFC_CTRL_BUFSIZE)
131 hw->ctrl_out_idx = 0; /* pointer wrap */ 129 hw->ctrl_out_idx = 0; /* pointer wrap */
@@ -1726,7 +1724,6 @@ hfcsusb_stop_endpoint(struct hfcsusb *hw, int channel)
1726static int 1724static int
1727setup_hfcsusb(struct hfcsusb *hw) 1725setup_hfcsusb(struct hfcsusb *hw)
1728{ 1726{
1729 int err;
1730 u_char b; 1727 u_char b;
1731 1728
1732 if (debug & DBG_HFC_CALL_TRACE) 1729 if (debug & DBG_HFC_CALL_TRACE)
@@ -1745,7 +1742,7 @@ setup_hfcsusb(struct hfcsusb *hw)
1745 } 1742 }
1746 1743
1747 /* first set the needed config, interface and alternate */ 1744 /* first set the needed config, interface and alternate */
1748 err = usb_set_interface(hw->dev, hw->if_used, hw->alt_used); 1745 (void) usb_set_interface(hw->dev, hw->if_used, hw->alt_used);
1749 1746
1750 hw->led_state = 0; 1747 hw->led_state = 0;
1751 1748
diff --git a/drivers/isdn/hardware/mISDN/netjet.c b/drivers/isdn/hardware/mISDN/netjet.c
index 54ae71a907f9..db25b6b2ae39 100644
--- a/drivers/isdn/hardware/mISDN/netjet.c
+++ b/drivers/isdn/hardware/mISDN/netjet.c
@@ -1072,6 +1072,12 @@ nj_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1072 return -ENODEV; 1072 return -ENODEV;
1073 } 1073 }
1074 1074
1075 if (pdev->subsystem_vendor == 0xb100 &&
1076 pdev->subsystem_device == 0x0003 ) {
1077 pr_notice("Netjet: Digium TDM400P not handled yet\n");
1078 return -ENODEV;
1079 }
1080
1075 card = kzalloc(sizeof(struct tiger_hw), GFP_ATOMIC); 1081 card = kzalloc(sizeof(struct tiger_hw), GFP_ATOMIC);
1076 if (!card) { 1082 if (!card) {
1077 pr_info("No kmem for Netjet\n"); 1083 pr_info("No kmem for Netjet\n");
diff --git a/drivers/isdn/hisax/arcofi.c b/drivers/isdn/hisax/arcofi.c
index 85a8fd8dd0b7..21cbbe1d5563 100644
--- a/drivers/isdn/hisax/arcofi.c
+++ b/drivers/isdn/hisax/arcofi.c
@@ -30,8 +30,6 @@ add_arcofi_timer(struct IsdnCardState *cs) {
30 30
31static void 31static void
32send_arcofi(struct IsdnCardState *cs) { 32send_arcofi(struct IsdnCardState *cs) {
33 u_char val;
34
35 add_arcofi_timer(cs); 33 add_arcofi_timer(cs);
36 cs->dc.isac.mon_txp = 0; 34 cs->dc.isac.mon_txp = 0;
37 cs->dc.isac.mon_txc = cs->dc.isac.arcofi_list->len; 35 cs->dc.isac.mon_txc = cs->dc.isac.arcofi_list->len;
@@ -45,7 +43,7 @@ send_arcofi(struct IsdnCardState *cs) {
45 cs->dc.isac.mocr &= 0x0f; 43 cs->dc.isac.mocr &= 0x0f;
46 cs->dc.isac.mocr |= 0xa0; 44 cs->dc.isac.mocr |= 0xa0;
47 cs->writeisac(cs, ISAC_MOCR, cs->dc.isac.mocr); 45 cs->writeisac(cs, ISAC_MOCR, cs->dc.isac.mocr);
48 val = cs->readisac(cs, ISAC_MOSR); 46 (void) cs->readisac(cs, ISAC_MOSR);
49 cs->writeisac(cs, ISAC_MOX1, cs->dc.isac.mon_tx[cs->dc.isac.mon_txp++]); 47 cs->writeisac(cs, ISAC_MOX1, cs->dc.isac.mon_tx[cs->dc.isac.mon_txp++]);
50 cs->dc.isac.mocr |= 0x10; 48 cs->dc.isac.mocr |= 0x10;
51 cs->writeisac(cs, ISAC_MOCR, cs->dc.isac.mocr); 49 cs->writeisac(cs, ISAC_MOCR, cs->dc.isac.mocr);
diff --git a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c
index ac4dd7857cbd..8f0ad2a52e87 100644
--- a/drivers/isdn/hisax/avma1_cs.c
+++ b/drivers/isdn/hisax/avma1_cs.c
@@ -146,7 +146,7 @@ static void avma1cs_release(struct pcmcia_device *link)
146 pcmcia_disable_device(link); 146 pcmcia_disable_device(link);
147} /* avma1cs_release */ 147} /* avma1cs_release */
148 148
149static struct pcmcia_device_id avma1cs_ids[] = { 149static const struct pcmcia_device_id avma1cs_ids[] = {
150 PCMCIA_DEVICE_PROD_ID12("AVM", "ISDN A", 0x95d42008, 0xadc9d4bb), 150 PCMCIA_DEVICE_PROD_ID12("AVM", "ISDN A", 0x95d42008, 0xadc9d4bb),
151 PCMCIA_DEVICE_PROD_ID12("ISDN", "CARD", 0x8d9761c8, 0x01c5aa7b), 151 PCMCIA_DEVICE_PROD_ID12("ISDN", "CARD", 0x8d9761c8, 0x01c5aa7b),
152 PCMCIA_DEVICE_NULL 152 PCMCIA_DEVICE_NULL
diff --git a/drivers/isdn/hisax/elsa_cs.c b/drivers/isdn/hisax/elsa_cs.c
index 496d477af0f8..f0b6c0ef99bb 100644
--- a/drivers/isdn/hisax/elsa_cs.c
+++ b/drivers/isdn/hisax/elsa_cs.c
@@ -129,12 +129,10 @@ static int elsa_cs_configcheck(struct pcmcia_device *p_dev, void *priv_data)
129 129
130static int __devinit elsa_cs_config(struct pcmcia_device *link) 130static int __devinit elsa_cs_config(struct pcmcia_device *link)
131{ 131{
132 local_info_t *dev;
133 int i; 132 int i;
134 IsdnCard_t icard; 133 IsdnCard_t icard;
135 134
136 dev_dbg(&link->dev, "elsa_config(0x%p)\n", link); 135 dev_dbg(&link->dev, "elsa_config(0x%p)\n", link);
137 dev = link->priv;
138 136
139 link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO; 137 link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO;
140 138
@@ -202,7 +200,7 @@ static int elsa_resume(struct pcmcia_device *link)
202 return 0; 200 return 0;
203} 201}
204 202
205static struct pcmcia_device_id elsa_ids[] = { 203static const struct pcmcia_device_id elsa_ids[] = {
206 PCMCIA_DEVICE_PROD_ID12("ELSA AG (Aachen, Germany)", "MicroLink ISDN/MC ", 0x983de2c4, 0x333ba257), 204 PCMCIA_DEVICE_PROD_ID12("ELSA AG (Aachen, Germany)", "MicroLink ISDN/MC ", 0x983de2c4, 0x333ba257),
207 PCMCIA_DEVICE_PROD_ID12("ELSA GmbH, Aachen", "MicroLink ISDN/MC ", 0x639e5718, 0x333ba257), 205 PCMCIA_DEVICE_PROD_ID12("ELSA GmbH, Aachen", "MicroLink ISDN/MC ", 0x639e5718, 0x333ba257),
208 PCMCIA_DEVICE_NULL 206 PCMCIA_DEVICE_NULL
diff --git a/drivers/isdn/hisax/elsa_ser.c b/drivers/isdn/hisax/elsa_ser.c
index cbda3790a10d..3fa9f6171095 100644
--- a/drivers/isdn/hisax/elsa_ser.c
+++ b/drivers/isdn/hisax/elsa_ser.c
@@ -109,11 +109,10 @@ static void change_speed(struct IsdnCardState *cs, int baud)
109{ 109{
110 int quot = 0, baud_base; 110 int quot = 0, baud_base;
111 unsigned cval, fcr = 0; 111 unsigned cval, fcr = 0;
112 int bits;
113 112
114 113
115 /* byte size and parity */ 114 /* byte size and parity */
116 cval = 0x03; bits = 10; 115 cval = 0x03;
117 /* Determine divisor based on baud rate */ 116 /* Determine divisor based on baud rate */
118 baud_base = BASE_BAUD; 117 baud_base = BASE_BAUD;
119 quot = baud_base / baud; 118 quot = baud_base / baud;
diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c
index 3147020d188b..0cb0546ead88 100644
--- a/drivers/isdn/hisax/hfc_pci.c
+++ b/drivers/isdn/hisax/hfc_pci.c
@@ -146,7 +146,7 @@ reset_hfcpci(struct IsdnCardState *cs)
146 /* D- and monitor/CI channel are not enabled */ 146 /* D- and monitor/CI channel are not enabled */
147 /* STIO1 is used as output for data, B1+B2 from ST->IOM+HFC */ 147 /* STIO1 is used as output for data, B1+B2 from ST->IOM+HFC */
148 /* STIO2 is used as data input, B1+B2 from IOM->ST */ 148 /* STIO2 is used as data input, B1+B2 from IOM->ST */
149 /* ST B-channel send disabled -> continous 1s */ 149 /* ST B-channel send disabled -> continuous 1s */
150 /* The IOM slots are always enabled */ 150 /* The IOM slots are always enabled */
151 cs->hw.hfcpci.conn = 0x36; /* set data flow directions */ 151 cs->hw.hfcpci.conn = 0x36; /* set data flow directions */
152 Write_hfc(cs, HFCPCI_CONNECT, cs->hw.hfcpci.conn); 152 Write_hfc(cs, HFCPCI_CONNECT, cs->hw.hfcpci.conn);
diff --git a/drivers/isdn/hisax/hfc_sx.c b/drivers/isdn/hisax/hfc_sx.c
index 1235b7131ae1..156d7c63d944 100644
--- a/drivers/isdn/hisax/hfc_sx.c
+++ b/drivers/isdn/hisax/hfc_sx.c
@@ -399,7 +399,7 @@ reset_hfcsx(struct IsdnCardState *cs)
399 /* D- and monitor/CI channel are not enabled */ 399 /* D- and monitor/CI channel are not enabled */
400 /* STIO1 is used as output for data, B1+B2 from ST->IOM+HFC */ 400 /* STIO1 is used as output for data, B1+B2 from ST->IOM+HFC */
401 /* STIO2 is used as data input, B1+B2 from IOM->ST */ 401 /* STIO2 is used as data input, B1+B2 from IOM->ST */
402 /* ST B-channel send disabled -> continous 1s */ 402 /* ST B-channel send disabled -> continuous 1s */
403 /* The IOM slots are always enabled */ 403 /* The IOM slots are always enabled */
404 cs->hw.hfcsx.conn = 0x36; /* set data flow directions */ 404 cs->hw.hfcsx.conn = 0x36; /* set data flow directions */
405 Write_hfc(cs, HFCSX_CONNECT, cs->hw.hfcsx.conn); 405 Write_hfc(cs, HFCSX_CONNECT, cs->hw.hfcsx.conn);
diff --git a/drivers/isdn/hisax/hfc_usb.c b/drivers/isdn/hisax/hfc_usb.c
index ed9527aa5f2c..f407de0e006d 100644
--- a/drivers/isdn/hisax/hfc_usb.c
+++ b/drivers/isdn/hisax/hfc_usb.c
@@ -258,11 +258,9 @@ static void
258ctrl_complete(struct urb *urb) 258ctrl_complete(struct urb *urb)
259{ 259{
260 hfcusb_data *hfc = (hfcusb_data *) urb->context; 260 hfcusb_data *hfc = (hfcusb_data *) urb->context;
261 ctrl_buft *buf;
262 261
263 urb->dev = hfc->dev; 262 urb->dev = hfc->dev;
264 if (hfc->ctrl_cnt) { 263 if (hfc->ctrl_cnt) {
265 buf = &hfc->ctrl_buff[hfc->ctrl_out_idx];
266 hfc->ctrl_cnt--; /* decrement actual count */ 264 hfc->ctrl_cnt--; /* decrement actual count */
267 if (++hfc->ctrl_out_idx >= HFC_CTRL_BUFSIZE) 265 if (++hfc->ctrl_out_idx >= HFC_CTRL_BUFSIZE)
268 hfc->ctrl_out_idx = 0; /* pointer wrap */ 266 hfc->ctrl_out_idx = 0; /* pointer wrap */
@@ -1097,7 +1095,7 @@ static int
1097hfc_usb_init(hfcusb_data * hfc) 1095hfc_usb_init(hfcusb_data * hfc)
1098{ 1096{
1099 usb_fifo *fifo; 1097 usb_fifo *fifo;
1100 int i, err; 1098 int i;
1101 u_char b; 1099 u_char b;
1102 struct hisax_b_if *p_b_if[2]; 1100 struct hisax_b_if *p_b_if[2];
1103 1101
@@ -1112,7 +1110,7 @@ hfc_usb_init(hfcusb_data * hfc)
1112 } 1110 }
1113 1111
1114 /* first set the needed config, interface and alternate */ 1112 /* first set the needed config, interface and alternate */
1115 err = usb_set_interface(hfc->dev, hfc->if_used, hfc->alt_used); 1113 usb_set_interface(hfc->dev, hfc->if_used, hfc->alt_used);
1116 1114
1117 /* do Chip reset */ 1115 /* do Chip reset */
1118 write_usb(hfc, HFCUSB_CIRM, 8); 1116 write_usb(hfc, HFCUSB_CIRM, 8);
diff --git a/drivers/isdn/hisax/hfc_usb.h b/drivers/isdn/hisax/hfc_usb.h
index e79f56568d30..2f581c0b4693 100644
--- a/drivers/isdn/hisax/hfc_usb.h
+++ b/drivers/isdn/hisax/hfc_usb.h
@@ -126,7 +126,7 @@ static struct hfcusb_symbolic_list urb_errlist[] = {
126 126
127 127
128/* 128/*
129 * device dependant information to support different 129 * device dependent information to support different
130 * ISDN Ta's using the HFC-S USB chip 130 * ISDN Ta's using the HFC-S USB chip
131 */ 131 */
132 132
diff --git a/drivers/isdn/hisax/ipacx.c b/drivers/isdn/hisax/ipacx.c
index 332104103e18..690840444184 100644
--- a/drivers/isdn/hisax/ipacx.c
+++ b/drivers/isdn/hisax/ipacx.c
@@ -96,7 +96,7 @@ dch_l2l1(struct PStack *st, int pr, void *arg)
96{ 96{
97 struct IsdnCardState *cs = (struct IsdnCardState *) st->l1.hardware; 97 struct IsdnCardState *cs = (struct IsdnCardState *) st->l1.hardware;
98 struct sk_buff *skb = arg; 98 struct sk_buff *skb = arg;
99 u_char cda1_cr, cda2_cr; 99 u_char cda1_cr;
100 100
101 switch (pr) { 101 switch (pr) {
102 case (PH_DATA |REQUEST): 102 case (PH_DATA |REQUEST):
@@ -163,7 +163,7 @@ dch_l2l1(struct PStack *st, int pr, void *arg)
163 cs->writeisac(cs, IPACX_CDA_TSDP10, 0x80); // Timeslot 0 is B1 163 cs->writeisac(cs, IPACX_CDA_TSDP10, 0x80); // Timeslot 0 is B1
164 cs->writeisac(cs, IPACX_CDA_TSDP11, 0x81); // Timeslot 0 is B1 164 cs->writeisac(cs, IPACX_CDA_TSDP11, 0x81); // Timeslot 0 is B1
165 cda1_cr = cs->readisac(cs, IPACX_CDA1_CR); 165 cda1_cr = cs->readisac(cs, IPACX_CDA1_CR);
166 cda2_cr = cs->readisac(cs, IPACX_CDA2_CR); 166 (void) cs->readisac(cs, IPACX_CDA2_CR);
167 if ((long)arg &1) { // loop B1 167 if ((long)arg &1) { // loop B1
168 cs->writeisac(cs, IPACX_CDA1_CR, cda1_cr |0x0a); 168 cs->writeisac(cs, IPACX_CDA1_CR, cda1_cr |0x0a);
169 } 169 }
diff --git a/drivers/isdn/hisax/jade.c b/drivers/isdn/hisax/jade.c
index ea8f840871d0..a06cea09158b 100644
--- a/drivers/isdn/hisax/jade.c
+++ b/drivers/isdn/hisax/jade.c
@@ -23,10 +23,9 @@
23int 23int
24JadeVersion(struct IsdnCardState *cs, char *s) 24JadeVersion(struct IsdnCardState *cs, char *s)
25{ 25{
26 int ver,i; 26 int ver;
27 int to = 50; 27 int to = 50;
28 cs->BC_Write_Reg(cs, -1, 0x50, 0x19); 28 cs->BC_Write_Reg(cs, -1, 0x50, 0x19);
29 i=0;
30 while (to) { 29 while (to) {
31 udelay(1); 30 udelay(1);
32 ver = cs->BC_Read_Reg(cs, -1, 0x60); 31 ver = cs->BC_Read_Reg(cs, -1, 0x60);
diff --git a/drivers/isdn/hisax/l3dss1.c b/drivers/isdn/hisax/l3dss1.c
index cc6ee2d39880..b0d9ab1f21c0 100644
--- a/drivers/isdn/hisax/l3dss1.c
+++ b/drivers/isdn/hisax/l3dss1.c
@@ -1595,7 +1595,7 @@ l3dss1_setup(struct l3_process *pc, u_char pr, void *arg)
1595 * Bearer Capabilities 1595 * Bearer Capabilities
1596 */ 1596 */
1597 p = skb->data; 1597 p = skb->data;
1598 /* only the first occurence 'll be detected ! */ 1598 /* only the first occurrence 'll be detected ! */
1599 if ((p = findie(p, skb->len, 0x04, 0))) { 1599 if ((p = findie(p, skb->len, 0x04, 0))) {
1600 if ((p[1] < 2) || (p[1] > 11)) 1600 if ((p[1] < 2) || (p[1] > 11))
1601 err = 1; 1601 err = 1;
@@ -2161,7 +2161,7 @@ static void l3dss1_redir_req_early(struct l3_process *pc, u_char pr, void *arg)
2161 2161
2162/***********************************************/ 2162/***********************************************/
2163/* handle special commands for this protocol. */ 2163/* handle special commands for this protocol. */
2164/* Examples are call independant services like */ 2164/* Examples are call independent services like */
2165/* remote operations with dummy callref. */ 2165/* remote operations with dummy callref. */
2166/***********************************************/ 2166/***********************************************/
2167static int l3dss1_cmd_global(struct PStack *st, isdn_ctrl *ic) 2167static int l3dss1_cmd_global(struct PStack *st, isdn_ctrl *ic)
@@ -2943,7 +2943,7 @@ global_handler(struct PStack *st, int mt, struct sk_buff *skb)
2943static void 2943static void
2944dss1up(struct PStack *st, int pr, void *arg) 2944dss1up(struct PStack *st, int pr, void *arg)
2945{ 2945{
2946 int i, mt, cr, cause, callState; 2946 int i, mt, cr, callState;
2947 char *ptr; 2947 char *ptr;
2948 u_char *p; 2948 u_char *p;
2949 struct sk_buff *skb = arg; 2949 struct sk_buff *skb = arg;
@@ -3034,12 +3034,10 @@ dss1up(struct PStack *st, int pr, void *arg)
3034 return; 3034 return;
3035 } 3035 }
3036 } else if (mt == MT_STATUS) { 3036 } else if (mt == MT_STATUS) {
3037 cause = 0;
3038 if ((ptr = findie(skb->data, skb->len, IE_CAUSE, 0)) != NULL) { 3037 if ((ptr = findie(skb->data, skb->len, IE_CAUSE, 0)) != NULL) {
3039 ptr++; 3038 ptr++;
3040 if (*ptr++ == 2) 3039 if (*ptr++ == 2)
3041 ptr++; 3040 ptr++;
3042 cause = *ptr & 0x7f;
3043 } 3041 }
3044 callState = 0; 3042 callState = 0;
3045 if ((ptr = findie(skb->data, skb->len, IE_CALL_STATE, 0)) != NULL) { 3043 if ((ptr = findie(skb->data, skb->len, IE_CALL_STATE, 0)) != NULL) {
diff --git a/drivers/isdn/hisax/l3ni1.c b/drivers/isdn/hisax/l3ni1.c
index f9584491fe8e..092dcbb39d94 100644
--- a/drivers/isdn/hisax/l3ni1.c
+++ b/drivers/isdn/hisax/l3ni1.c
@@ -1449,7 +1449,7 @@ l3ni1_setup(struct l3_process *pc, u_char pr, void *arg)
1449 * Bearer Capabilities 1449 * Bearer Capabilities
1450 */ 1450 */
1451 p = skb->data; 1451 p = skb->data;
1452 /* only the first occurence 'll be detected ! */ 1452 /* only the first occurrence 'll be detected ! */
1453 if ((p = findie(p, skb->len, 0x04, 0))) { 1453 if ((p = findie(p, skb->len, 0x04, 0))) {
1454 if ((p[1] < 2) || (p[1] > 11)) 1454 if ((p[1] < 2) || (p[1] > 11))
1455 err = 1; 1455 err = 1;
@@ -2017,7 +2017,7 @@ static void l3ni1_redir_req_early(struct l3_process *pc, u_char pr, void *arg)
2017 2017
2018/***********************************************/ 2018/***********************************************/
2019/* handle special commands for this protocol. */ 2019/* handle special commands for this protocol. */
2020/* Examples are call independant services like */ 2020/* Examples are call independent services like */
2021/* remote operations with dummy callref. */ 2021/* remote operations with dummy callref. */
2022/***********************************************/ 2022/***********************************************/
2023static int l3ni1_cmd_global(struct PStack *st, isdn_ctrl *ic) 2023static int l3ni1_cmd_global(struct PStack *st, isdn_ctrl *ic)
@@ -2883,7 +2883,7 @@ global_handler(struct PStack *st, int mt, struct sk_buff *skb)
2883static void 2883static void
2884ni1up(struct PStack *st, int pr, void *arg) 2884ni1up(struct PStack *st, int pr, void *arg)
2885{ 2885{
2886 int i, mt, cr, cause, callState; 2886 int i, mt, cr, callState;
2887 char *ptr; 2887 char *ptr;
2888 u_char *p; 2888 u_char *p;
2889 struct sk_buff *skb = arg; 2889 struct sk_buff *skb = arg;
@@ -2986,12 +2986,10 @@ ni1up(struct PStack *st, int pr, void *arg)
2986 return; 2986 return;
2987 } 2987 }
2988 } else if (mt == MT_STATUS) { 2988 } else if (mt == MT_STATUS) {
2989 cause = 0;
2990 if ((ptr = findie(skb->data, skb->len, IE_CAUSE, 0)) != NULL) { 2989 if ((ptr = findie(skb->data, skb->len, IE_CAUSE, 0)) != NULL) {
2991 ptr++; 2990 ptr++;
2992 if (*ptr++ == 2) 2991 if (*ptr++ == 2)
2993 ptr++; 2992 ptr++;
2994 cause = *ptr & 0x7f;
2995 } 2993 }
2996 callState = 0; 2994 callState = 0;
2997 if ((ptr = findie(skb->data, skb->len, IE_CALL_STATE, 0)) != NULL) { 2995 if ((ptr = findie(skb->data, skb->len, IE_CALL_STATE, 0)) != NULL) {
diff --git a/drivers/isdn/hisax/nj_s.c b/drivers/isdn/hisax/nj_s.c
index 2344e7b33448..a1b89524b505 100644
--- a/drivers/isdn/hisax/nj_s.c
+++ b/drivers/isdn/hisax/nj_s.c
@@ -167,7 +167,7 @@ static int __devinit njs_pci_probe(struct pci_dev *dev_netjet,
167 return(0); 167 return(0);
168 } 168 }
169 /* the TJ300 and TJ320 must be detected, the IRQ handling is different 169 /* the TJ300 and TJ320 must be detected, the IRQ handling is different
170 * unfortunatly the chips use the same device ID, but the TJ320 has 170 * unfortunately the chips use the same device ID, but the TJ320 has
171 * the bit20 in status PCI cfg register set 171 * the bit20 in status PCI cfg register set
172 */ 172 */
173 pci_read_config_dword(dev_netjet, 0x04, &cfg); 173 pci_read_config_dword(dev_netjet, 0x04, &cfg);
diff --git a/drivers/isdn/hisax/sedlbauer_cs.c b/drivers/isdn/hisax/sedlbauer_cs.c
index 360204bc2777..06473f81f039 100644
--- a/drivers/isdn/hisax/sedlbauer_cs.c
+++ b/drivers/isdn/hisax/sedlbauer_cs.c
@@ -186,7 +186,7 @@ static int sedlbauer_resume(struct pcmcia_device *link)
186} 186}
187 187
188 188
189static struct pcmcia_device_id sedlbauer_ids[] = { 189static const struct pcmcia_device_id sedlbauer_ids[] = {
190 PCMCIA_DEVICE_PROD_ID123("SEDLBAUER", "speed star II", "V 3.1", 0x81fb79f5, 0xf3612e1d, 0x6b95c78a), 190 PCMCIA_DEVICE_PROD_ID123("SEDLBAUER", "speed star II", "V 3.1", 0x81fb79f5, 0xf3612e1d, 0x6b95c78a),
191 PCMCIA_DEVICE_PROD_ID123("SEDLBAUER", "ISDN-Adapter", "4D67", 0x81fb79f5, 0xe4e9bc12, 0x397b7e90), 191 PCMCIA_DEVICE_PROD_ID123("SEDLBAUER", "ISDN-Adapter", "4D67", 0x81fb79f5, 0xe4e9bc12, 0x397b7e90),
192 PCMCIA_DEVICE_PROD_ID123("SEDLBAUER", "ISDN-Adapter", "4D98", 0x81fb79f5, 0xe4e9bc12, 0x2e5c7fce), 192 PCMCIA_DEVICE_PROD_ID123("SEDLBAUER", "ISDN-Adapter", "4D98", 0x81fb79f5, 0xe4e9bc12, 0x2e5c7fce),
diff --git a/drivers/isdn/hisax/st5481.h b/drivers/isdn/hisax/st5481.h
index 64f78a8c28c5..b9054cb7a0da 100644
--- a/drivers/isdn/hisax/st5481.h
+++ b/drivers/isdn/hisax/st5481.h
@@ -377,7 +377,6 @@ struct st5481_bcs {
377}; 377};
378 378
379struct st5481_adapter { 379struct st5481_adapter {
380 struct list_head list;
381 int number_of_leds; 380 int number_of_leds;
382 struct usb_device *usb_dev; 381 struct usb_device *usb_dev;
383 struct hisax_d_if hisax_d_if; 382 struct hisax_d_if hisax_d_if;
diff --git a/drivers/isdn/hisax/st5481_b.c b/drivers/isdn/hisax/st5481_b.c
index e56e5af889b6..ed4bc564dc63 100644
--- a/drivers/isdn/hisax/st5481_b.c
+++ b/drivers/isdn/hisax/st5481_b.c
@@ -124,7 +124,7 @@ static void usb_b_out(struct st5481_bcs *bcs,int buf_nr)
124} 124}
125 125
126/* 126/*
127 * Start transfering (flags or data) on the B channel, since 127 * Start transferring (flags or data) on the B channel, since
128 * FIFO counters has been set to a non-zero value. 128 * FIFO counters has been set to a non-zero value.
129 */ 129 */
130static void st5481B_start_xfer(void *context) 130static void st5481B_start_xfer(void *context)
diff --git a/drivers/isdn/hisax/st5481_init.c b/drivers/isdn/hisax/st5481_init.c
index 13751237bfcd..9f7fd18ff773 100644
--- a/drivers/isdn/hisax/st5481_init.c
+++ b/drivers/isdn/hisax/st5481_init.c
@@ -46,8 +46,6 @@ module_param(debug, int, 0);
46#endif 46#endif
47int st5481_debug; 47int st5481_debug;
48 48
49static LIST_HEAD(adapter_list);
50
51/* ====================================================================== 49/* ======================================================================
52 * registration/deregistration with the USB layer 50 * registration/deregistration with the USB layer
53 */ 51 */
@@ -86,7 +84,6 @@ static int probe_st5481(struct usb_interface *intf,
86 adapter->bcs[i].b_if.ifc.priv = &adapter->bcs[i]; 84 adapter->bcs[i].b_if.ifc.priv = &adapter->bcs[i];
87 adapter->bcs[i].b_if.ifc.l2l1 = st5481_b_l2l1; 85 adapter->bcs[i].b_if.ifc.l2l1 = st5481_b_l2l1;
88 } 86 }
89 list_add(&adapter->list, &adapter_list);
90 87
91 retval = st5481_setup_usb(adapter); 88 retval = st5481_setup_usb(adapter);
92 if (retval < 0) 89 if (retval < 0)
@@ -125,6 +122,7 @@ static int probe_st5481(struct usb_interface *intf,
125 err_usb: 122 err_usb:
126 st5481_release_usb(adapter); 123 st5481_release_usb(adapter);
127 err: 124 err:
125 kfree(adapter);
128 return -EIO; 126 return -EIO;
129} 127}
130 128
@@ -142,8 +140,6 @@ static void disconnect_st5481(struct usb_interface *intf)
142 if (!adapter) 140 if (!adapter)
143 return; 141 return;
144 142
145 list_del(&adapter->list);
146
147 st5481_stop(adapter); 143 st5481_stop(adapter);
148 st5481_release_b(&adapter->bcs[1]); 144 st5481_release_b(&adapter->bcs[1]);
149 st5481_release_b(&adapter->bcs[0]); 145 st5481_release_b(&adapter->bcs[0]);
diff --git a/drivers/isdn/hisax/st5481_usb.c b/drivers/isdn/hisax/st5481_usb.c
index 10d41c5d73ed..159e8fa00fd6 100644
--- a/drivers/isdn/hisax/st5481_usb.c
+++ b/drivers/isdn/hisax/st5481_usb.c
@@ -470,7 +470,7 @@ void st5481_release_isocpipes(struct urb* urb[2])
470 470
471/* 471/*
472 * Decode frames received on the B/D channel. 472 * Decode frames received on the B/D channel.
473 * Note that this function will be called continously 473 * Note that this function will be called continuously
474 * with 64Kbit/s / 16Kbit/s of data and hence it will be 474 * with 64Kbit/s / 16Kbit/s of data and hence it will be
475 * called 50 times per second with 20 ISOC descriptors. 475 * called 50 times per second with 20 ISOC descriptors.
476 * Called at interrupt. 476 * Called at interrupt.
diff --git a/drivers/isdn/hisax/teles_cs.c b/drivers/isdn/hisax/teles_cs.c
index 282a4467ef19..161a1938552e 100644
--- a/drivers/isdn/hisax/teles_cs.c
+++ b/drivers/isdn/hisax/teles_cs.c
@@ -9,7 +9,7 @@
9 Also inspired by ELSA PCMCIA driver 9 Also inspired by ELSA PCMCIA driver
10 by Klaus Lichtenwalder <Lichtenwalder@ACM.org> 10 by Klaus Lichtenwalder <Lichtenwalder@ACM.org>
11 11
12 Extentions to new hisax_pcmcia by Karsten Keil 12 Extensions to new hisax_pcmcia by Karsten Keil
13 13
14 minor changes to be compatible with kernel 2.4.x 14 minor changes to be compatible with kernel 2.4.x
15 by Jan.Schubert@GMX.li 15 by Jan.Schubert@GMX.li
@@ -111,12 +111,10 @@ static int teles_cs_configcheck(struct pcmcia_device *p_dev, void *priv_data)
111 111
112static int __devinit teles_cs_config(struct pcmcia_device *link) 112static int __devinit teles_cs_config(struct pcmcia_device *link)
113{ 113{
114 local_info_t *dev;
115 int i; 114 int i;
116 IsdnCard_t icard; 115 IsdnCard_t icard;
117 116
118 dev_dbg(&link->dev, "teles_config(0x%p)\n", link); 117 dev_dbg(&link->dev, "teles_config(0x%p)\n", link);
119 dev = link->priv;
120 118
121 i = pcmcia_loop_config(link, teles_cs_configcheck, NULL); 119 i = pcmcia_loop_config(link, teles_cs_configcheck, NULL);
122 if (i != 0) 120 if (i != 0)
@@ -185,7 +183,7 @@ static int teles_resume(struct pcmcia_device *link)
185} 183}
186 184
187 185
188static struct pcmcia_device_id teles_ids[] = { 186static const struct pcmcia_device_id teles_ids[] = {
189 PCMCIA_DEVICE_PROD_ID12("TELES", "S0/PC", 0x67b50eae, 0xe9e70119), 187 PCMCIA_DEVICE_PROD_ID12("TELES", "S0/PC", 0x67b50eae, 0xe9e70119),
190 PCMCIA_DEVICE_NULL, 188 PCMCIA_DEVICE_NULL,
191}; 189};
diff --git a/drivers/isdn/hysdn/hysdn_proclog.c b/drivers/isdn/hysdn/hysdn_proclog.c
index 2ee93d04b2dd..236cc7dadfd0 100644
--- a/drivers/isdn/hysdn/hysdn_proclog.c
+++ b/drivers/isdn/hysdn/hysdn_proclog.c
@@ -155,7 +155,6 @@ put_log_buffer(hysdn_card * card, char *cp)
155static ssize_t 155static ssize_t
156hysdn_log_write(struct file *file, const char __user *buf, size_t count, loff_t * off) 156hysdn_log_write(struct file *file, const char __user *buf, size_t count, loff_t * off)
157{ 157{
158 unsigned long u = 0;
159 int rc; 158 int rc;
160 unsigned char valbuf[128]; 159 unsigned char valbuf[128];
161 hysdn_card *card = file->private_data; 160 hysdn_card *card = file->private_data;
@@ -167,12 +166,10 @@ hysdn_log_write(struct file *file, const char __user *buf, size_t count, loff_t
167 166
168 valbuf[count] = 0; /* terminating 0 */ 167 valbuf[count] = 0; /* terminating 0 */
169 168
170 rc = strict_strtoul(valbuf, 0, &u); 169 rc = kstrtoul(valbuf, 0, &card->debug_flags);
171 170 if (rc < 0)
172 if (rc == 0) { 171 return rc;
173 card->debug_flags = u; /* remember debug flags */ 172 hysdn_addlog(card, "debug set to 0x%lx", card->debug_flags);
174 hysdn_addlog(card, "debug set to 0x%lx", card->debug_flags);
175 }
176 return (count); 173 return (count);
177} /* hysdn_log_write */ 174} /* hysdn_log_write */
178 175
diff --git a/drivers/isdn/hysdn/hysdn_sched.c b/drivers/isdn/hysdn/hysdn_sched.c
index 81db4a190d41..3674d30d6a03 100644
--- a/drivers/isdn/hysdn/hysdn_sched.c
+++ b/drivers/isdn/hysdn/hysdn_sched.c
@@ -143,7 +143,7 @@ hysdn_sched_tx(hysdn_card *card, unsigned char *buf,
143/* send one config line to the card and return 0 if successful, otherwise a */ 143/* send one config line to the card and return 0 if successful, otherwise a */
144/* negative error code. */ 144/* negative error code. */
145/* The function works with timeouts perhaps not giving the greatest speed */ 145/* The function works with timeouts perhaps not giving the greatest speed */
146/* sending the line, but this should be meaningless beacuse only some lines */ 146/* sending the line, but this should be meaningless because only some lines */
147/* are to be sent and this happens very seldom. */ 147/* are to be sent and this happens very seldom. */
148/*****************************************************************************/ 148/*****************************************************************************/
149int 149int
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c
index 15632bd2f643..6ed82add6ffa 100644
--- a/drivers/isdn/i4l/isdn_common.c
+++ b/drivers/isdn/i4l/isdn_common.c
@@ -399,13 +399,8 @@ isdn_all_eaz(int di, int ch)
399#include <linux/isdn/capicmd.h> 399#include <linux/isdn/capicmd.h>
400 400
401static int 401static int
402isdn_capi_rec_hl_msg(capi_msg *cm) { 402isdn_capi_rec_hl_msg(capi_msg *cm)
403 403{
404 int di;
405 int ch;
406
407 di = (cm->adr.Controller & 0x7f) -1;
408 ch = isdn_dc2minor(di, (cm->adr.Controller>>8)& 0x7f);
409 switch(cm->Command) { 404 switch(cm->Command) {
410 case CAPI_FACILITY: 405 case CAPI_FACILITY:
411 /* in the moment only handled in tty */ 406 /* in the moment only handled in tty */
@@ -1278,7 +1273,6 @@ isdn_ioctl(struct file *file, uint cmd, ulong arg)
1278 uint minor = iminor(file->f_path.dentry->d_inode); 1273 uint minor = iminor(file->f_path.dentry->d_inode);
1279 isdn_ctrl c; 1274 isdn_ctrl c;
1280 int drvidx; 1275 int drvidx;
1281 int chidx;
1282 int ret; 1276 int ret;
1283 int i; 1277 int i;
1284 char __user *p; 1278 char __user *p;
@@ -1340,7 +1334,6 @@ isdn_ioctl(struct file *file, uint cmd, ulong arg)
1340 drvidx = isdn_minor2drv(minor); 1334 drvidx = isdn_minor2drv(minor);
1341 if (drvidx < 0) 1335 if (drvidx < 0)
1342 return -ENODEV; 1336 return -ENODEV;
1343 chidx = isdn_minor2chan(minor);
1344 if (!(dev->drv[drvidx]->flags & DRV_FLAG_RUNNING)) 1337 if (!(dev->drv[drvidx]->flags & DRV_FLAG_RUNNING))
1345 return -ENODEV; 1338 return -ENODEV;
1346 return 0; 1339 return 0;
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c
index afeede7ee295..97988111e45a 100644
--- a/drivers/isdn/i4l/isdn_net.c
+++ b/drivers/isdn/i4l/isdn_net.c
@@ -1530,7 +1530,7 @@ isdn_net_ciscohdlck_slarp_send_keepalive(unsigned long data)
1530 printk (KERN_WARNING 1530 printk (KERN_WARNING
1531 "UPDOWN: Line protocol on Interface %s," 1531 "UPDOWN: Line protocol on Interface %s,"
1532 " changed state to down\n", lp->netdev->dev->name); 1532 " changed state to down\n", lp->netdev->dev->name);
1533 /* should stop routing higher-level data accross */ 1533 /* should stop routing higher-level data across */
1534 } else if ((!lp->cisco_line_state) && 1534 } else if ((!lp->cisco_line_state) &&
1535 (myseq_diff >= 0) && (myseq_diff <= 2)) { 1535 (myseq_diff >= 0) && (myseq_diff <= 2)) {
1536 /* line down -> up */ 1536 /* line down -> up */
@@ -1538,7 +1538,7 @@ isdn_net_ciscohdlck_slarp_send_keepalive(unsigned long data)
1538 printk (KERN_WARNING 1538 printk (KERN_WARNING
1539 "UPDOWN: Line protocol on Interface %s," 1539 "UPDOWN: Line protocol on Interface %s,"
1540 " changed state to up\n", lp->netdev->dev->name); 1540 " changed state to up\n", lp->netdev->dev->name);
1541 /* restart routing higher-level data accross */ 1541 /* restart routing higher-level data across */
1542 } 1542 }
1543 1543
1544 if (lp->cisco_debserint) 1544 if (lp->cisco_debserint)
@@ -1678,7 +1678,6 @@ isdn_net_ciscohdlck_slarp_in(isdn_net_local *lp, struct sk_buff *skb)
1678 u32 your_seq; 1678 u32 your_seq;
1679 __be32 local; 1679 __be32 local;
1680 __be32 *addr, *mask; 1680 __be32 *addr, *mask;
1681 u16 unused;
1682 1681
1683 if (skb->len < 14) 1682 if (skb->len < 14)
1684 return; 1683 return;
@@ -1722,7 +1721,6 @@ isdn_net_ciscohdlck_slarp_in(isdn_net_local *lp, struct sk_buff *skb)
1722 lp->cisco_last_slarp_in = jiffies; 1721 lp->cisco_last_slarp_in = jiffies;
1723 my_seq = be32_to_cpup((__be32 *)(p + 0)); 1722 my_seq = be32_to_cpup((__be32 *)(p + 0));
1724 your_seq = be32_to_cpup((__be32 *)(p + 4)); 1723 your_seq = be32_to_cpup((__be32 *)(p + 4));
1725 unused = be16_to_cpup((__be16 *)(p + 8));
1726 p += 10; 1724 p += 10;
1727 lp->cisco_yourseq = my_seq; 1725 lp->cisco_yourseq = my_seq;
1728 lp->cisco_mineseen = your_seq; 1726 lp->cisco_mineseen = your_seq;
diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c
index 9e8162c80bb0..1b002b0002a4 100644
--- a/drivers/isdn/i4l/isdn_ppp.c
+++ b/drivers/isdn/i4l/isdn_ppp.c
@@ -1514,7 +1514,7 @@ int isdn_ppp_autodial_filter(struct sk_buff *skb, isdn_net_local *lp)
1514#define MP_LONGSEQ_MAXBIT ((MP_LONGSEQ_MASK+1)>>1) 1514#define MP_LONGSEQ_MAXBIT ((MP_LONGSEQ_MASK+1)>>1)
1515#define MP_SHORTSEQ_MAXBIT ((MP_SHORTSEQ_MASK+1)>>1) 1515#define MP_SHORTSEQ_MAXBIT ((MP_SHORTSEQ_MASK+1)>>1)
1516 1516
1517/* sequence-wrap safe comparisions (for long sequence)*/ 1517/* sequence-wrap safe comparisons (for long sequence)*/
1518#define MP_LT(a,b) ((a-b)&MP_LONGSEQ_MAXBIT) 1518#define MP_LT(a,b) ((a-b)&MP_LONGSEQ_MAXBIT)
1519#define MP_LE(a,b) !((b-a)&MP_LONGSEQ_MAXBIT) 1519#define MP_LE(a,b) !((b-a)&MP_LONGSEQ_MAXBIT)
1520#define MP_GT(a,b) ((b-a)&MP_LONGSEQ_MAXBIT) 1520#define MP_GT(a,b) ((b-a)&MP_LONGSEQ_MAXBIT)
@@ -1746,7 +1746,7 @@ static void isdn_ppp_mp_receive(isdn_net_dev * net_dev, isdn_net_local * lp,
1746 * then next fragment should be the start of new reassembly 1746 * then next fragment should be the start of new reassembly
1747 * if sequence is contiguous, but we haven't reassembled yet, 1747 * if sequence is contiguous, but we haven't reassembled yet,
1748 * keep going. 1748 * keep going.
1749 * if sequence is not contiguous, either clear everyting 1749 * if sequence is not contiguous, either clear everything
1750 * below low watermark and set start to the next frag or 1750 * below low watermark and set start to the next frag or
1751 * clear start ptr. 1751 * clear start ptr.
1752 */ 1752 */
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c
index 3d88f15aa218..d8504279e502 100644
--- a/drivers/isdn/i4l/isdn_tty.c
+++ b/drivers/isdn/i4l/isdn_tty.c
@@ -792,7 +792,7 @@ isdn_tty_suspend(char *id, modem_info * info, atemu * m)
792} 792}
793 793
794/* isdn_tty_resume() tries to resume a suspended call 794/* isdn_tty_resume() tries to resume a suspended call
795 * setup of the lower levels before that. unfortunatly here is no 795 * setup of the lower levels before that. unfortunately here is no
796 * checking for compatibility of used protocols implemented by Q931 796 * checking for compatibility of used protocols implemented by Q931
797 * It does the same things like isdn_tty_dial, the last command 797 * It does the same things like isdn_tty_dial, the last command
798 * is different, may be we can merge it. 798 * is different, may be we can merge it.
@@ -998,7 +998,6 @@ isdn_tty_change_speed(modem_info * info)
998{ 998{
999 uint cflag, 999 uint cflag,
1000 cval, 1000 cval,
1001 fcr,
1002 quot; 1001 quot;
1003 int i; 1002 int i;
1004 1003
@@ -1037,7 +1036,6 @@ isdn_tty_change_speed(modem_info * info)
1037 cval |= UART_LCR_PARITY; 1036 cval |= UART_LCR_PARITY;
1038 if (!(cflag & PARODD)) 1037 if (!(cflag & PARODD))
1039 cval |= UART_LCR_EPAR; 1038 cval |= UART_LCR_EPAR;
1040 fcr = 0;
1041 1039
1042 /* CTS flow control flag and modem status interrupts */ 1040 /* CTS flow control flag and modem status interrupts */
1043 if (cflag & CRTSCTS) { 1041 if (cflag & CRTSCTS) {
diff --git a/drivers/isdn/isdnloop/isdnloop.c b/drivers/isdn/isdnloop/isdnloop.c
index b8a1098b66ed..d497db0a26d0 100644
--- a/drivers/isdn/isdnloop/isdnloop.c
+++ b/drivers/isdn/isdnloop/isdnloop.c
@@ -954,7 +954,7 @@ isdnloop_parse_cmd(isdnloop_card * card)
954/* 954/*
955 * Put command-strings into the of the 'card'. In reality, execute them 955 * Put command-strings into the of the 'card'. In reality, execute them
956 * right in place by calling isdnloop_parse_cmd(). Also copy every 956 * right in place by calling isdnloop_parse_cmd(). Also copy every
957 * command to the read message ringbuffer, preceeding it with a '>'. 957 * command to the read message ringbuffer, preceding it with a '>'.
958 * These mesagges can be read at /dev/isdnctrl. 958 * These mesagges can be read at /dev/isdnctrl.
959 * 959 *
960 * Parameter: 960 * Parameter:
diff --git a/drivers/isdn/mISDN/dsp.h b/drivers/isdn/mISDN/dsp.h
index 18af86879c05..8549431430f0 100644
--- a/drivers/isdn/mISDN/dsp.h
+++ b/drivers/isdn/mISDN/dsp.h
@@ -21,7 +21,7 @@
21/* options may be: 21/* options may be:
22 * 22 *
23 * bit 0 = use ulaw instead of alaw 23 * bit 0 = use ulaw instead of alaw
24 * bit 1 = enable hfc hardware accelleration for all channels 24 * bit 1 = enable hfc hardware acceleration for all channels
25 * 25 *
26 */ 26 */
27#define DSP_OPT_ULAW (1<<0) 27#define DSP_OPT_ULAW (1<<0)
diff --git a/drivers/isdn/mISDN/dsp_cmx.c b/drivers/isdn/mISDN/dsp_cmx.c
index 309bacf1fadc..4d395dea32f3 100644
--- a/drivers/isdn/mISDN/dsp_cmx.c
+++ b/drivers/isdn/mISDN/dsp_cmx.c
@@ -1513,7 +1513,7 @@ dsp_cmx_send_member(struct dsp *dsp, int len, s32 *c, int members)
1513 /* -> if echo is NOT enabled */ 1513 /* -> if echo is NOT enabled */
1514 if (!dsp->echo.software) { 1514 if (!dsp->echo.software) {
1515 /* 1515 /*
1516 * -> substract rx-data from conf-data, 1516 * -> subtract rx-data from conf-data,
1517 * if tx-data is available, mix 1517 * if tx-data is available, mix
1518 */ 1518 */
1519 while (r != rr && t != tt) { 1519 while (r != rr && t != tt) {
@@ -1572,7 +1572,7 @@ dsp_cmx_send_member(struct dsp *dsp, int len, s32 *c, int members)
1572send_packet: 1572send_packet:
1573 /* 1573 /*
1574 * send tx-data if enabled - don't filter, 1574 * send tx-data if enabled - don't filter,
1575 * becuase we want what we send, not what we filtered 1575 * because we want what we send, not what we filtered
1576 */ 1576 */
1577 if (dsp->tx_data) { 1577 if (dsp->tx_data) {
1578 if (tx_data_only) { 1578 if (tx_data_only) {
diff --git a/drivers/isdn/mISDN/dsp_core.c b/drivers/isdn/mISDN/dsp_core.c
index 6f5b54864283..2877291a9ed8 100644
--- a/drivers/isdn/mISDN/dsp_core.c
+++ b/drivers/isdn/mISDN/dsp_core.c
@@ -115,7 +115,7 @@
115 * 115 *
116 * The CMX has special functions for conferences with one, two and more 116 * The CMX has special functions for conferences with one, two and more
117 * members. It will allow different types of data flow. Receive and transmit 117 * members. It will allow different types of data flow. Receive and transmit
118 * data to/form upper layer may be swithed on/off individually without loosing 118 * data to/form upper layer may be swithed on/off individually without losing
119 * features of CMX, Tones and DTMF. 119 * features of CMX, Tones and DTMF.
120 * 120 *
121 * Echo Cancellation: Sometimes we like to cancel echo from the interface. 121 * Echo Cancellation: Sometimes we like to cancel echo from the interface.
@@ -127,9 +127,9 @@
127 * 127 *
128 * If all used features can be realized in hardware, and if transmit and/or 128 * If all used features can be realized in hardware, and if transmit and/or
129 * receive data ist disabled, the card may not send/receive any data at all. 129 * receive data ist disabled, the card may not send/receive any data at all.
130 * Not receiving is usefull if only announcements are played. Not sending is 130 * Not receiving is useful if only announcements are played. Not sending is
131 * usefull if an answering machine records audio. Not sending and receiving is 131 * useful if an answering machine records audio. Not sending and receiving is
132 * usefull during most states of the call. If supported by hardware, tones 132 * useful during most states of the call. If supported by hardware, tones
133 * will be played without cpu load. Small PBXs and NT-Mode applications will 133 * will be played without cpu load. Small PBXs and NT-Mode applications will
134 * not need expensive hardware when processing calls. 134 * not need expensive hardware when processing calls.
135 * 135 *
diff --git a/drivers/isdn/mISDN/dsp_dtmf.c b/drivers/isdn/mISDN/dsp_dtmf.c
index 9ae2d33b06f7..5b484c3f4af6 100644
--- a/drivers/isdn/mISDN/dsp_dtmf.c
+++ b/drivers/isdn/mISDN/dsp_dtmf.c
@@ -106,7 +106,7 @@ void dsp_dtmf_hardware(struct dsp *dsp)
106 * tested it allot. it even works with very short tones (40ms). the only 106 * tested it allot. it even works with very short tones (40ms). the only
107 * disadvantage is, that it doesn't work good with different volumes of both 107 * disadvantage is, that it doesn't work good with different volumes of both
108 * tones. this will happen, if accoustically coupled dialers are used. 108 * tones. this will happen, if accoustically coupled dialers are used.
109 * it sometimes detects tones during speach, which is normal for decoders. 109 * it sometimes detects tones during speech, which is normal for decoders.
110 * use sequences to given commands during calls. 110 * use sequences to given commands during calls.
111 * 111 *
112 * dtmf - points to a structure of the current dtmf state 112 * dtmf - points to a structure of the current dtmf state
@@ -244,7 +244,7 @@ coefficients:
244 if (result[i] < tresh) { 244 if (result[i] < tresh) {
245 lowgroup = -1; 245 lowgroup = -1;
246 highgroup = -1; 246 highgroup = -1;
247 break; /* noise inbetween */ 247 break; /* noise in between */
248 } 248 }
249 /* good level found. This is allowed only one time per group */ 249 /* good level found. This is allowed only one time per group */
250 if (i < NCOEFF/2) { 250 if (i < NCOEFF/2) {
diff --git a/drivers/isdn/mISDN/dsp_tones.c b/drivers/isdn/mISDN/dsp_tones.c
index 7dbe54ed1deb..4e4440e8bae5 100644
--- a/drivers/isdn/mISDN/dsp_tones.c
+++ b/drivers/isdn/mISDN/dsp_tones.c
@@ -394,7 +394,7 @@ void dsp_tone_copy(struct dsp *dsp, u8 *data, int len)
394 while (len) { 394 while (len) {
395 /* find sample to start with */ 395 /* find sample to start with */
396 while (42) { 396 while (42) {
397 /* warp arround */ 397 /* wrap around */
398 if (!pat->seq[index]) { 398 if (!pat->seq[index]) {
399 count = 0; 399 count = 0;
400 index = 0; 400 index = 0;
diff --git a/drivers/isdn/mISDN/l1oip_core.c b/drivers/isdn/mISDN/l1oip_core.c
index bd526f664a39..22f8ec8b9247 100644
--- a/drivers/isdn/mISDN/l1oip_core.c
+++ b/drivers/isdn/mISDN/l1oip_core.c
@@ -179,7 +179,7 @@ NOTE: A value of 0 equals 256 bytes of data.
179- Time Base = Timestamp of first sample in frame 179- Time Base = Timestamp of first sample in frame
180The "Time Base" is used to rearange packets and to detect packet loss. 180The "Time Base" is used to rearange packets and to detect packet loss.
181The 16 bits are sent in network order (MSB first) and count 1/8000 th of a 181The 16 bits are sent in network order (MSB first) and count 1/8000 th of a
182second. This causes a wrap arround each 8,192 seconds. There is no requirement 182second. This causes a wrap around each 8,192 seconds. There is no requirement
183for the initial "Time Base", but 0 should be used for the first packet. 183for the initial "Time Base", but 0 should be used for the first packet.
184In case of HDLC data, this timestamp counts the packet or byte number. 184In case of HDLC data, this timestamp counts the packet or byte number.
185 185
@@ -205,7 +205,7 @@ On Demand:
205 205
206If the ondemand parameter is given, the remote IP is set to 0 on timeout. 206If the ondemand parameter is given, the remote IP is set to 0 on timeout.
207This will stop keepalive traffic to remote. If the remote is online again, 207This will stop keepalive traffic to remote. If the remote is online again,
208traffic will continue to the remote address. This is usefull for road warriors. 208traffic will continue to the remote address. This is useful for road warriors.
209This feature only works with ID set, otherwhise it is highly unsecure. 209This feature only works with ID set, otherwhise it is highly unsecure.
210 210
211 211
@@ -590,7 +590,7 @@ multiframe:
590 return; 590 return;
591 } 591 }
592 } else 592 } else
593 mlen = len-2; /* single frame, substract timebase */ 593 mlen = len-2; /* single frame, subtract timebase */
594 594
595 if (len < 2) { 595 if (len < 2) {
596 printk(KERN_WARNING "%s: packet error - packet too short, time " 596 printk(KERN_WARNING "%s: packet error - packet too short, time "
diff --git a/drivers/isdn/mISDN/layer2.c b/drivers/isdn/mISDN/layer2.c
index 4ae75053c9d2..5bc00156315e 100644
--- a/drivers/isdn/mISDN/layer2.c
+++ b/drivers/isdn/mISDN/layer2.c
@@ -1640,7 +1640,7 @@ l2_tei_remove(struct FsmInst *fi, int event, void *arg)
1640} 1640}
1641 1641
1642static void 1642static void
1643l2_st14_persistant_da(struct FsmInst *fi, int event, void *arg) 1643l2_st14_persistent_da(struct FsmInst *fi, int event, void *arg)
1644{ 1644{
1645 struct layer2 *l2 = fi->userdata; 1645 struct layer2 *l2 = fi->userdata;
1646 struct sk_buff *skb = arg; 1646 struct sk_buff *skb = arg;
@@ -1654,7 +1654,7 @@ l2_st14_persistant_da(struct FsmInst *fi, int event, void *arg)
1654} 1654}
1655 1655
1656static void 1656static void
1657l2_st5_persistant_da(struct FsmInst *fi, int event, void *arg) 1657l2_st5_persistent_da(struct FsmInst *fi, int event, void *arg)
1658{ 1658{
1659 struct layer2 *l2 = fi->userdata; 1659 struct layer2 *l2 = fi->userdata;
1660 struct sk_buff *skb = arg; 1660 struct sk_buff *skb = arg;
@@ -1671,7 +1671,7 @@ l2_st5_persistant_da(struct FsmInst *fi, int event, void *arg)
1671} 1671}
1672 1672
1673static void 1673static void
1674l2_st6_persistant_da(struct FsmInst *fi, int event, void *arg) 1674l2_st6_persistent_da(struct FsmInst *fi, int event, void *arg)
1675{ 1675{
1676 struct layer2 *l2 = fi->userdata; 1676 struct layer2 *l2 = fi->userdata;
1677 struct sk_buff *skb = arg; 1677 struct sk_buff *skb = arg;
@@ -1685,7 +1685,7 @@ l2_st6_persistant_da(struct FsmInst *fi, int event, void *arg)
1685} 1685}
1686 1686
1687static void 1687static void
1688l2_persistant_da(struct FsmInst *fi, int event, void *arg) 1688l2_persistent_da(struct FsmInst *fi, int event, void *arg)
1689{ 1689{
1690 struct layer2 *l2 = fi->userdata; 1690 struct layer2 *l2 = fi->userdata;
1691 struct sk_buff *skb = arg; 1691 struct sk_buff *skb = arg;
@@ -1829,14 +1829,14 @@ static struct FsmNode L2FnList[] =
1829 {ST_L2_6, EV_L2_FRAME_ERROR, l2_frame_error}, 1829 {ST_L2_6, EV_L2_FRAME_ERROR, l2_frame_error},
1830 {ST_L2_7, EV_L2_FRAME_ERROR, l2_frame_error_reest}, 1830 {ST_L2_7, EV_L2_FRAME_ERROR, l2_frame_error_reest},
1831 {ST_L2_8, EV_L2_FRAME_ERROR, l2_frame_error_reest}, 1831 {ST_L2_8, EV_L2_FRAME_ERROR, l2_frame_error_reest},
1832 {ST_L2_1, EV_L1_DEACTIVATE, l2_st14_persistant_da}, 1832 {ST_L2_1, EV_L1_DEACTIVATE, l2_st14_persistent_da},
1833 {ST_L2_2, EV_L1_DEACTIVATE, l2_st24_tei_remove}, 1833 {ST_L2_2, EV_L1_DEACTIVATE, l2_st24_tei_remove},
1834 {ST_L2_3, EV_L1_DEACTIVATE, l2_st3_tei_remove}, 1834 {ST_L2_3, EV_L1_DEACTIVATE, l2_st3_tei_remove},
1835 {ST_L2_4, EV_L1_DEACTIVATE, l2_st14_persistant_da}, 1835 {ST_L2_4, EV_L1_DEACTIVATE, l2_st14_persistent_da},
1836 {ST_L2_5, EV_L1_DEACTIVATE, l2_st5_persistant_da}, 1836 {ST_L2_5, EV_L1_DEACTIVATE, l2_st5_persistent_da},
1837 {ST_L2_6, EV_L1_DEACTIVATE, l2_st6_persistant_da}, 1837 {ST_L2_6, EV_L1_DEACTIVATE, l2_st6_persistent_da},
1838 {ST_L2_7, EV_L1_DEACTIVATE, l2_persistant_da}, 1838 {ST_L2_7, EV_L1_DEACTIVATE, l2_persistent_da},
1839 {ST_L2_8, EV_L1_DEACTIVATE, l2_persistant_da}, 1839 {ST_L2_8, EV_L1_DEACTIVATE, l2_persistent_da},
1840}; 1840};
1841 1841
1842static int 1842static int
@@ -1864,7 +1864,7 @@ ph_data_indication(struct layer2 *l2, struct mISDNhead *hh, struct sk_buff *skb)
1864 psapi >>= 2; 1864 psapi >>= 2;
1865 ptei >>= 1; 1865 ptei >>= 1;
1866 if (psapi != l2->sapi) { 1866 if (psapi != l2->sapi) {
1867 /* not our bussiness */ 1867 /* not our business */
1868 if (*debug & DEBUG_L2) 1868 if (*debug & DEBUG_L2)
1869 printk(KERN_DEBUG "%s: sapi %d/%d mismatch\n", 1869 printk(KERN_DEBUG "%s: sapi %d/%d mismatch\n",
1870 __func__, psapi, l2->sapi); 1870 __func__, psapi, l2->sapi);
@@ -1872,7 +1872,7 @@ ph_data_indication(struct layer2 *l2, struct mISDNhead *hh, struct sk_buff *skb)
1872 return 0; 1872 return 0;
1873 } 1873 }
1874 if ((ptei != l2->tei) && (ptei != GROUP_TEI)) { 1874 if ((ptei != l2->tei) && (ptei != GROUP_TEI)) {
1875 /* not our bussiness */ 1875 /* not our business */
1876 if (*debug & DEBUG_L2) 1876 if (*debug & DEBUG_L2)
1877 printk(KERN_DEBUG "%s: tei %d/%d mismatch\n", 1877 printk(KERN_DEBUG "%s: tei %d/%d mismatch\n",
1878 __func__, ptei, l2->tei); 1878 __func__, ptei, l2->tei);
diff --git a/drivers/isdn/mISDN/socket.c b/drivers/isdn/mISDN/socket.c
index 7446d8b4282d..8e325227b4c0 100644
--- a/drivers/isdn/mISDN/socket.c
+++ b/drivers/isdn/mISDN/socket.c
@@ -457,6 +457,9 @@ static int data_sock_getsockopt(struct socket *sock, int level, int optname,
457 if (get_user(len, optlen)) 457 if (get_user(len, optlen))
458 return -EFAULT; 458 return -EFAULT;
459 459
460 if (len != sizeof(char))
461 return -EINVAL;
462
460 switch (optname) { 463 switch (optname) {
461 case MISDN_TIME_STAMP: 464 case MISDN_TIME_STAMP:
462 if (_pms(sk)->cmask & MISDN_TIME_STAMP) 465 if (_pms(sk)->cmask & MISDN_TIME_STAMP)