diff options
Diffstat (limited to 'drivers/isdn')
28 files changed, 80 insertions, 498 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 | ||
36 | config 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 | |||
46 | config ISDN_CAPI_CAPIFS | ||
47 | tristate | ||
48 | depends on ISDN_CAPI_CAPIFS_BOOL | ||
49 | default ISDN_CAPI_CAPI20 | ||
50 | |||
51 | config ISDN_CAPI_CAPIDRV | 36 | config 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 @@ | |||
7 | obj-$(CONFIG_ISDN_CAPI) += kernelcapi.o | 7 | obj-$(CONFIG_ISDN_CAPI) += kernelcapi.o |
8 | obj-$(CONFIG_ISDN_CAPI_CAPI20) += capi.o | 8 | obj-$(CONFIG_ISDN_CAPI_CAPI20) += capi.o |
9 | obj-$(CONFIG_ISDN_CAPI_CAPIDRV) += capidrv.o | 9 | obj-$(CONFIG_ISDN_CAPI_CAPIDRV) += capidrv.o |
10 | obj-$(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 | |||
43 | MODULE_DESCRIPTION("CAPI4Linux: Userspace /dev/capi20 interface"); | 41 | MODULE_DESCRIPTION("CAPI4Linux: Userspace /dev/capi20 interface"); |
44 | MODULE_AUTHOR("Carsten Paeth"); | 42 | MODULE_AUTHOR("Carsten Paeth"); |
45 | MODULE_LICENSE("GPL"); | 43 | MODULE_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 | ||
52 | static DEFINE_MUTEX(capi_mutex); | 47 | static 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 | ||
301 | static void capincci_alloc_minor(struct capidev *cdev, struct capincci *np) | 295 | static 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 | ||
316 | static void capincci_free_minor(struct capincci *np) | 301 | static 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 | ||
1228 | static void capinc_tty_set_termios(struct tty_struct *tty, struct ktermios * old) | 1183 | static 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 | ||
1235 | static void capinc_tty_throttle(struct tty_struct *tty) | 1188 | static 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 | ||
1286 | static int capinc_tty_break_ctl(struct tty_struct *tty, int state) | 1229 | static 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 | ||
1294 | static void capinc_tty_flush_buffer(struct tty_struct *tty) | 1235 | static 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 | ||
1301 | static void capinc_tty_set_ldisc(struct tty_struct *tty) | 1240 | static 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 | ||
1308 | static void capinc_tty_send_xchar(struct tty_struct *tty, char ch) | 1245 | static 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 | ||
1315 | static const struct tty_operations capinc_ops = { | 1250 | static 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 | |||
23 | MODULE_DESCRIPTION("CAPI4Linux: /dev/capi/ filesystem"); | ||
24 | MODULE_AUTHOR("Carsten Paeth"); | ||
25 | MODULE_LICENSE("GPL"); | ||
26 | |||
27 | /* ------------------------------------------------------------------ */ | ||
28 | |||
29 | #define CAPIFS_SUPER_MAGIC (('C'<<8)|'N') | ||
30 | |||
31 | static struct vfsmount *capifs_mnt; | ||
32 | static int capifs_mnt_count; | ||
33 | |||
34 | static 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 | |||
44 | static 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 | |||
89 | static 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 | |||
97 | static int | ||
98 | capifs_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); | ||
124 | fail: | ||
125 | return -ENOMEM; | ||
126 | } | ||
127 | |||
128 | static 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 | |||
134 | static 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 | |||
141 | static 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 | |||
182 | unlock_out: | ||
183 | mutex_unlock(&root->d_inode->i_mutex); | ||
184 | |||
185 | return dentry; | ||
186 | } | ||
187 | |||
188 | struct 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 | |||
202 | void 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 | |||
225 | static int __init capifs_init(void) | ||
226 | { | ||
227 | return register_filesystem(&capifs_fs_type); | ||
228 | } | ||
229 | |||
230 | static void __exit capifs_exit(void) | ||
231 | { | ||
232 | unregister_filesystem(&capifs_fs_type); | ||
233 | } | ||
234 | |||
235 | EXPORT_SYMBOL(capifs_new_ncci); | ||
236 | EXPORT_SYMBOL(capifs_free_ncci); | ||
237 | |||
238 | module_init(capifs_init); | ||
239 | module_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 | |||
14 | struct dentry *capifs_new_ncci(unsigned int num, dev_t device); | ||
15 | void capifs_free_ncci(struct dentry *dentry); | ||
16 | |||
17 | #else | ||
18 | |||
19 | static inline struct dentry *capifs_new_ncci(unsigned int num, dev_t device) | ||
20 | { | ||
21 | return NULL; | ||
22 | } | ||
23 | |||
24 | static 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 | */ |
391 | static int cid_of_response(char *s) | 391 | static 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/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 | |||
861 | void diva_mnt_add_xdi_adapter (const DESCRIPTOR* d) { | 861 | void 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/message.c b/drivers/isdn/hardware/eicon/message.c index 8c5c563c4f12..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 */ |
@@ -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) { |
@@ -10119,14 +10115,12 @@ static byte dtmf_request (dword Id, word Number, DIVA_CAPI_ADAPTER *a, PLCI | |||
10119 | 10115 | ||
10120 | static void dtmf_confirmation (dword Id, PLCI *plci) | 10116 | static 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) | |||
11520 | static void mixer_command (dword Id, PLCI *plci, byte Rc) | 11514 | static 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 | |||
12448 | static void mixer_indication_coefs_set (dword Id, PLCI *plci) | 12438 | static 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 | ||
14112 | static void fax_connect_ack_command (dword Id, PLCI *plci, byte Rc) | 14100 | static 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 | ||
14161 | static void fax_edata_ack_command (dword Id, PLCI *plci, byte Rc) | 14147 | static 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 | ||
14396 | static void rtp_connect_b3_res_command (dword Id, PLCI *plci, byte Rc) | 14380 | static 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/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c index 4343abac0b13..b01a7be1300f 100644 --- a/drivers/isdn/hardware/mISDN/hfcpci.c +++ b/drivers/isdn/hardware/mISDN/hfcpci.c | |||
@@ -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 | |||
968 | ph_state_nt(struct dchannel *dch) | 967 | ph_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 | |||
118 | ctrl_complete(struct urb *urb) | 118 | ctrl_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) | |||
1726 | static int | 1724 | static int |
1727 | setup_hfcsusb(struct hfcsusb *hw) | 1725 | setup_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/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 | ||
31 | static void | 31 | static void |
32 | send_arcofi(struct IsdnCardState *cs) { | 32 | send_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/elsa_cs.c b/drivers/isdn/hisax/elsa_cs.c index 496d477af0f8..9e5e87be756b 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 | ||
130 | static int __devinit elsa_cs_config(struct pcmcia_device *link) | 130 | static 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 | ||
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_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 | |||
258 | ctrl_complete(struct urb *urb) | 258 | ctrl_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 | |||
1097 | hfc_usb_init(hfcusb_data * hfc) | 1095 | hfc_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/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 @@ | |||
23 | int | 23 | int |
24 | JadeVersion(struct IsdnCardState *cs, char *s) | 24 | JadeVersion(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 8e2fd02ecce0..b0d9ab1f21c0 100644 --- a/drivers/isdn/hisax/l3dss1.c +++ b/drivers/isdn/hisax/l3dss1.c | |||
@@ -2943,7 +2943,7 @@ global_handler(struct PStack *st, int mt, struct sk_buff *skb) | |||
2943 | static void | 2943 | static void |
2944 | dss1up(struct PStack *st, int pr, void *arg) | 2944 | dss1up(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 7b229c0ce115..092dcbb39d94 100644 --- a/drivers/isdn/hisax/l3ni1.c +++ b/drivers/isdn/hisax/l3ni1.c | |||
@@ -2883,7 +2883,7 @@ global_handler(struct PStack *st, int mt, struct sk_buff *skb) | |||
2883 | static void | 2883 | static void |
2884 | ni1up(struct PStack *st, int pr, void *arg) | 2884 | ni1up(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/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 | ||
379 | struct st5481_adapter { | 379 | struct 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_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 |
47 | int st5481_debug; | 47 | int st5481_debug; |
48 | 48 | ||
49 | static 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/teles_cs.c b/drivers/isdn/hisax/teles_cs.c index aa25e183bf79..360f9ec7c802 100644 --- a/drivers/isdn/hisax/teles_cs.c +++ b/drivers/isdn/hisax/teles_cs.c | |||
@@ -111,12 +111,10 @@ static int teles_cs_configcheck(struct pcmcia_device *p_dev, void *priv_data) | |||
111 | 111 | ||
112 | static int __devinit teles_cs_config(struct pcmcia_device *link) | 112 | static 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) |
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) | |||
155 | static ssize_t | 155 | static ssize_t |
156 | hysdn_log_write(struct file *file, const char __user *buf, size_t count, loff_t * off) | 156 | hysdn_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/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 | ||
401 | static int | 401 | static int |
402 | isdn_capi_rec_hl_msg(capi_msg *cm) { | 402 | isdn_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 2a7d17c19489..97988111e45a 100644 --- a/drivers/isdn/i4l/isdn_net.c +++ b/drivers/isdn/i4l/isdn_net.c | |||
@@ -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_tty.c b/drivers/isdn/i4l/isdn_tty.c index 607d846ae063..d8504279e502 100644 --- a/drivers/isdn/i4l/isdn_tty.c +++ b/drivers/isdn/i4l/isdn_tty.c | |||
@@ -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/mISDN/layer2.c b/drivers/isdn/mISDN/layer2.c index d0aeb44ee7c0..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 | ||
1642 | static void | 1642 | static void |
1643 | l2_st14_persistant_da(struct FsmInst *fi, int event, void *arg) | 1643 | l2_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 | ||
1656 | static void | 1656 | static void |
1657 | l2_st5_persistant_da(struct FsmInst *fi, int event, void *arg) | 1657 | l2_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 | ||
1673 | static void | 1673 | static void |
1674 | l2_st6_persistant_da(struct FsmInst *fi, int event, void *arg) | 1674 | l2_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 | ||
1687 | static void | 1687 | static void |
1688 | l2_persistant_da(struct FsmInst *fi, int event, void *arg) | 1688 | l2_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 | ||
1842 | static int | 1842 | static int |
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) |