diff options
Diffstat (limited to 'drivers/isdn/capi/capi.c')
-rw-r--r-- | drivers/isdn/capi/capi.c | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index b382edeeee1..cf5e996ac44 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c | |||
@@ -85,7 +85,6 @@ struct datahandle_queue { | |||
85 | struct capiminor { | 85 | struct capiminor { |
86 | struct kref kref; | 86 | struct kref kref; |
87 | 87 | ||
88 | struct capincci *nccip; | ||
89 | unsigned int minor; | 88 | unsigned int minor; |
90 | struct dentry *capifs_dentry; | 89 | struct dentry *capifs_dentry; |
91 | 90 | ||
@@ -328,10 +327,6 @@ static void capincci_alloc_minor(struct capidev *cdev, struct capincci *np) | |||
328 | 327 | ||
329 | mp = np->minorp = capiminor_alloc(&cdev->ap, np->ncci); | 328 | mp = np->minorp = capiminor_alloc(&cdev->ap, np->ncci); |
330 | if (mp) { | 329 | if (mp) { |
331 | mp->nccip = np; | ||
332 | #ifdef _DEBUG_REFCOUNT | ||
333 | printk(KERN_DEBUG "set mp->nccip\n"); | ||
334 | #endif | ||
335 | device = MKDEV(capinc_tty_driver->major, mp->minor); | 330 | device = MKDEV(capinc_tty_driver->major, mp->minor); |
336 | mp->capifs_dentry = capifs_new_ncci(mp->minor, device); | 331 | mp->capifs_dentry = capifs_new_ncci(mp->minor, device); |
337 | } | 332 | } |
@@ -347,10 +342,6 @@ static void capincci_free_minor(struct capincci *np) | |||
347 | 342 | ||
348 | tty = tty_port_tty_get(&mp->port); | 343 | tty = tty_port_tty_get(&mp->port); |
349 | if (tty) { | 344 | if (tty) { |
350 | mp->nccip = NULL; | ||
351 | #ifdef _DEBUG_REFCOUNT | ||
352 | printk(KERN_DEBUG "reset mp->nccip\n"); | ||
353 | #endif | ||
354 | tty_vhangup(tty); | 345 | tty_vhangup(tty); |
355 | tty_kref_put(tty); | 346 | tty_kref_put(tty); |
356 | } | 347 | } |
@@ -1094,7 +1085,7 @@ static void capinc_tty_close(struct tty_struct *tty, struct file *filp) | |||
1094 | tty_port_close(&mp->port, tty, filp); | 1085 | tty_port_close(&mp->port, tty, filp); |
1095 | } | 1086 | } |
1096 | 1087 | ||
1097 | static int capinc_tty_write(struct tty_struct * tty, | 1088 | static int capinc_tty_write(struct tty_struct *tty, |
1098 | const unsigned char *buf, int count) | 1089 | const unsigned char *buf, int count) |
1099 | { | 1090 | { |
1100 | struct capiminor *mp = tty->driver_data; | 1091 | struct capiminor *mp = tty->driver_data; |
@@ -1105,13 +1096,6 @@ static int capinc_tty_write(struct tty_struct * tty, | |||
1105 | printk(KERN_DEBUG "capinc_tty_write(count=%d)\n", count); | 1096 | printk(KERN_DEBUG "capinc_tty_write(count=%d)\n", count); |
1106 | #endif | 1097 | #endif |
1107 | 1098 | ||
1108 | if (!mp->nccip) { | ||
1109 | #ifdef _DEBUG_TTYFUNCS | ||
1110 | printk(KERN_DEBUG "capinc_tty_write: mp or mp->ncci NULL\n"); | ||
1111 | #endif | ||
1112 | return 0; | ||
1113 | } | ||
1114 | |||
1115 | spin_lock_irqsave(&workaround_lock, flags); | 1099 | spin_lock_irqsave(&workaround_lock, flags); |
1116 | skb = mp->ttyskb; | 1100 | skb = mp->ttyskb; |
1117 | if (skb) { | 1101 | if (skb) { |
@@ -1149,13 +1133,6 @@ static int capinc_tty_put_char(struct tty_struct *tty, unsigned char ch) | |||
1149 | printk(KERN_DEBUG "capinc_put_char(%u)\n", ch); | 1133 | printk(KERN_DEBUG "capinc_put_char(%u)\n", ch); |
1150 | #endif | 1134 | #endif |
1151 | 1135 | ||
1152 | if (!mp->nccip) { | ||
1153 | #ifdef _DEBUG_TTYFUNCS | ||
1154 | printk(KERN_DEBUG "capinc_tty_put_char: mp or mp->ncci NULL\n"); | ||
1155 | #endif | ||
1156 | return 0; | ||
1157 | } | ||
1158 | |||
1159 | spin_lock_irqsave(&workaround_lock, flags); | 1136 | spin_lock_irqsave(&workaround_lock, flags); |
1160 | skb = mp->ttyskb; | 1137 | skb = mp->ttyskb; |
1161 | if (skb) { | 1138 | if (skb) { |
@@ -1192,13 +1169,6 @@ static void capinc_tty_flush_chars(struct tty_struct *tty) | |||
1192 | printk(KERN_DEBUG "capinc_tty_flush_chars\n"); | 1169 | printk(KERN_DEBUG "capinc_tty_flush_chars\n"); |
1193 | #endif | 1170 | #endif |
1194 | 1171 | ||
1195 | if (!mp->nccip) { | ||
1196 | #ifdef _DEBUG_TTYFUNCS | ||
1197 | printk(KERN_DEBUG "capinc_tty_flush_chars: mp or mp->ncci NULL\n"); | ||
1198 | #endif | ||
1199 | return; | ||
1200 | } | ||
1201 | |||
1202 | spin_lock_irqsave(&workaround_lock, flags); | 1172 | spin_lock_irqsave(&workaround_lock, flags); |
1203 | skb = mp->ttyskb; | 1173 | skb = mp->ttyskb; |
1204 | if (skb) { | 1174 | if (skb) { |
@@ -1216,12 +1186,6 @@ static int capinc_tty_write_room(struct tty_struct *tty) | |||
1216 | struct capiminor *mp = tty->driver_data; | 1186 | struct capiminor *mp = tty->driver_data; |
1217 | int room; | 1187 | int room; |
1218 | 1188 | ||
1219 | if (!mp->nccip) { | ||
1220 | #ifdef _DEBUG_TTYFUNCS | ||
1221 | printk(KERN_DEBUG "capinc_tty_write_room: mp or mp->ncci NULL\n"); | ||
1222 | #endif | ||
1223 | return 0; | ||
1224 | } | ||
1225 | room = CAPINC_MAX_SENDQUEUE-skb_queue_len(&mp->outqueue); | 1189 | room = CAPINC_MAX_SENDQUEUE-skb_queue_len(&mp->outqueue); |
1226 | room *= CAPI_MAX_BLKSIZE; | 1190 | room *= CAPI_MAX_BLKSIZE; |
1227 | #ifdef _DEBUG_TTYFUNCS | 1191 | #ifdef _DEBUG_TTYFUNCS |
@@ -1234,12 +1198,6 @@ static int capinc_tty_chars_in_buffer(struct tty_struct *tty) | |||
1234 | { | 1198 | { |
1235 | struct capiminor *mp = tty->driver_data; | 1199 | struct capiminor *mp = tty->driver_data; |
1236 | 1200 | ||
1237 | if (!mp->nccip) { | ||
1238 | #ifdef _DEBUG_TTYFUNCS | ||
1239 | printk(KERN_DEBUG "capinc_tty_chars_in_buffer: mp or mp->ncci NULL\n"); | ||
1240 | #endif | ||
1241 | return 0; | ||
1242 | } | ||
1243 | #ifdef _DEBUG_TTYFUNCS | 1201 | #ifdef _DEBUG_TTYFUNCS |
1244 | printk(KERN_DEBUG "capinc_tty_chars_in_buffer = %d nack=%d sq=%d rq=%d\n", | 1202 | printk(KERN_DEBUG "capinc_tty_chars_in_buffer = %d nack=%d sq=%d rq=%d\n", |
1245 | mp->outbytes, mp->nack, | 1203 | mp->outbytes, mp->nack, |