aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/hisax/isdnl1.c3
-rw-r--r--drivers/isdn/hisax/isdnl2.c17
-rw-r--r--drivers/isdn/hisax/isdnl3.c2
-rw-r--r--drivers/isdn/i4l/isdn_tty.c4
-rw-r--r--drivers/isdn/icn/icn.c4
5 files changed, 16 insertions, 14 deletions
diff --git a/drivers/isdn/hisax/isdnl1.c b/drivers/isdn/hisax/isdnl1.c
index ac899503a74f..bab356886483 100644
--- a/drivers/isdn/hisax/isdnl1.c
+++ b/drivers/isdn/hisax/isdnl1.c
@@ -279,7 +279,8 @@ BChannel_proc_xmt(struct BCState *bcs)
279 if (test_and_clear_bit(FLG_L1_PULL_REQ, &st->l1.Flags)) 279 if (test_and_clear_bit(FLG_L1_PULL_REQ, &st->l1.Flags))
280 st->l1.l1l2(st, PH_PULL | CONFIRM, NULL); 280 st->l1.l1l2(st, PH_PULL | CONFIRM, NULL);
281 if (!test_bit(BC_FLG_ACTIV, &bcs->Flag)) { 281 if (!test_bit(BC_FLG_ACTIV, &bcs->Flag)) {
282 if (!test_bit(BC_FLG_BUSY, &bcs->Flag) && (!skb_queue_len(&bcs->squeue))) { 282 if (!test_bit(BC_FLG_BUSY, &bcs->Flag) &&
283 skb_queue_empty(&bcs->squeue)) {
283 st->l2.l2l1(st, PH_DEACTIVATE | CONFIRM, NULL); 284 st->l2.l2l1(st, PH_DEACTIVATE | CONFIRM, NULL);
284 } 285 }
285 } 286 }
diff --git a/drivers/isdn/hisax/isdnl2.c b/drivers/isdn/hisax/isdnl2.c
index 9022583fd6a0..1615c1a76ab8 100644
--- a/drivers/isdn/hisax/isdnl2.c
+++ b/drivers/isdn/hisax/isdnl2.c
@@ -108,7 +108,8 @@ static int l2addrsize(struct Layer2 *l2);
108static void 108static void
109set_peer_busy(struct Layer2 *l2) { 109set_peer_busy(struct Layer2 *l2) {
110 test_and_set_bit(FLG_PEER_BUSY, &l2->flag); 110 test_and_set_bit(FLG_PEER_BUSY, &l2->flag);
111 if (skb_queue_len(&l2->i_queue) || skb_queue_len(&l2->ui_queue)) 111 if (!skb_queue_empty(&l2->i_queue) ||
112 !skb_queue_empty(&l2->ui_queue))
112 test_and_set_bit(FLG_L2BLOCK, &l2->flag); 113 test_and_set_bit(FLG_L2BLOCK, &l2->flag);
113} 114}
114 115
@@ -754,7 +755,7 @@ l2_restart_multi(struct FsmInst *fi, int event, void *arg)
754 st->l2.l2l3(st, DL_ESTABLISH | INDICATION, NULL); 755 st->l2.l2l3(st, DL_ESTABLISH | INDICATION, NULL);
755 756
756 if ((ST_L2_7==state) || (ST_L2_8 == state)) 757 if ((ST_L2_7==state) || (ST_L2_8 == state))
757 if (skb_queue_len(&st->l2.i_queue) && cansend(st)) 758 if (!skb_queue_empty(&st->l2.i_queue) && cansend(st))
758 st->l2.l2l1(st, PH_PULL | REQUEST, NULL); 759 st->l2.l2l1(st, PH_PULL | REQUEST, NULL);
759} 760}
760 761
@@ -810,7 +811,7 @@ l2_connected(struct FsmInst *fi, int event, void *arg)
810 if (pr != -1) 811 if (pr != -1)
811 st->l2.l2l3(st, pr, NULL); 812 st->l2.l2l3(st, pr, NULL);
812 813
813 if (skb_queue_len(&st->l2.i_queue) && cansend(st)) 814 if (!skb_queue_empty(&st->l2.i_queue) && cansend(st))
814 st->l2.l2l1(st, PH_PULL | REQUEST, NULL); 815 st->l2.l2l1(st, PH_PULL | REQUEST, NULL);
815} 816}
816 817
@@ -1014,7 +1015,7 @@ l2_st7_got_super(struct FsmInst *fi, int event, void *arg)
1014 if(typ != RR) FsmDelTimer(&st->l2.t203, 9); 1015 if(typ != RR) FsmDelTimer(&st->l2.t203, 9);
1015 restart_t200(st, 12); 1016 restart_t200(st, 12);
1016 } 1017 }
1017 if (skb_queue_len(&st->l2.i_queue) && (typ == RR)) 1018 if (!skb_queue_empty(&st->l2.i_queue) && (typ == RR))
1018 st->l2.l2l1(st, PH_PULL | REQUEST, NULL); 1019 st->l2.l2l1(st, PH_PULL | REQUEST, NULL);
1019 } else 1020 } else
1020 nrerrorrecovery(fi); 1021 nrerrorrecovery(fi);
@@ -1120,7 +1121,7 @@ l2_got_iframe(struct FsmInst *fi, int event, void *arg)
1120 return; 1121 return;
1121 } 1122 }
1122 1123
1123 if (skb_queue_len(&st->l2.i_queue) && (fi->state == ST_L2_7)) 1124 if (!skb_queue_empty(&st->l2.i_queue) && (fi->state == ST_L2_7))
1124 st->l2.l2l1(st, PH_PULL | REQUEST, NULL); 1125 st->l2.l2l1(st, PH_PULL | REQUEST, NULL);
1125 if (test_and_clear_bit(FLG_ACK_PEND, &st->l2.flag)) 1126 if (test_and_clear_bit(FLG_ACK_PEND, &st->l2.flag))
1126 enquiry_cr(st, RR, RSP, 0); 1127 enquiry_cr(st, RR, RSP, 0);
@@ -1138,7 +1139,7 @@ l2_got_tei(struct FsmInst *fi, int event, void *arg)
1138 test_and_set_bit(FLG_L3_INIT, &st->l2.flag); 1139 test_and_set_bit(FLG_L3_INIT, &st->l2.flag);
1139 } else 1140 } else
1140 FsmChangeState(fi, ST_L2_4); 1141 FsmChangeState(fi, ST_L2_4);
1141 if (skb_queue_len(&st->l2.ui_queue)) 1142 if (!skb_queue_empty(&st->l2.ui_queue))
1142 tx_ui(st); 1143 tx_ui(st);
1143} 1144}
1144 1145
@@ -1301,7 +1302,7 @@ l2_pull_iqueue(struct FsmInst *fi, int event, void *arg)
1301 FsmDelTimer(&st->l2.t203, 13); 1302 FsmDelTimer(&st->l2.t203, 13);
1302 FsmAddTimer(&st->l2.t200, st->l2.T200, EV_L2_T200, NULL, 11); 1303 FsmAddTimer(&st->l2.t200, st->l2.T200, EV_L2_T200, NULL, 11);
1303 } 1304 }
1304 if (skb_queue_len(&l2->i_queue) && cansend(st)) 1305 if (!skb_queue_empty(&l2->i_queue) && cansend(st))
1305 st->l2.l2l1(st, PH_PULL | REQUEST, NULL); 1306 st->l2.l2l1(st, PH_PULL | REQUEST, NULL);
1306} 1307}
1307 1308
@@ -1347,7 +1348,7 @@ l2_st8_got_super(struct FsmInst *fi, int event, void *arg)
1347 } 1348 }
1348 invoke_retransmission(st, nr); 1349 invoke_retransmission(st, nr);
1349 FsmChangeState(fi, ST_L2_7); 1350 FsmChangeState(fi, ST_L2_7);
1350 if (skb_queue_len(&l2->i_queue) && cansend(st)) 1351 if (!skb_queue_empty(&l2->i_queue) && cansend(st))
1351 st->l2.l2l1(st, PH_PULL | REQUEST, NULL); 1352 st->l2.l2l1(st, PH_PULL | REQUEST, NULL);
1352 } else 1353 } else
1353 nrerrorrecovery(fi); 1354 nrerrorrecovery(fi);
diff --git a/drivers/isdn/hisax/isdnl3.c b/drivers/isdn/hisax/isdnl3.c
index abcc9530eb34..c9917cd2132b 100644
--- a/drivers/isdn/hisax/isdnl3.c
+++ b/drivers/isdn/hisax/isdnl3.c
@@ -302,7 +302,7 @@ release_l3_process(struct l3_process *p)
302 !test_bit(FLG_PTP, &p->st->l2.flag)) { 302 !test_bit(FLG_PTP, &p->st->l2.flag)) {
303 if (p->debug) 303 if (p->debug)
304 l3_debug(p->st, "release_l3_process: last process"); 304 l3_debug(p->st, "release_l3_process: last process");
305 if (!skb_queue_len(&p->st->l3.squeue)) { 305 if (skb_queue_empty(&p->st->l3.squeue)) {
306 if (p->debug) 306 if (p->debug)
307 l3_debug(p->st, "release_l3_process: release link"); 307 l3_debug(p->st, "release_l3_process: release link");
308 if (p->st->protocol != ISDN_PTYPE_NI1) 308 if (p->st->protocol != ISDN_PTYPE_NI1)
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c
index ad5aa38fb5a6..b37ef1f06b3d 100644
--- a/drivers/isdn/i4l/isdn_tty.c
+++ b/drivers/isdn/i4l/isdn_tty.c
@@ -1223,7 +1223,7 @@ isdn_tty_write(struct tty_struct *tty, const u_char * buf, int count)
1223 total += c; 1223 total += c;
1224 } 1224 }
1225 atomic_dec(&info->xmit_lock); 1225 atomic_dec(&info->xmit_lock);
1226 if ((info->xmit_count) || (skb_queue_len(&info->xmit_queue))) { 1226 if ((info->xmit_count) || !skb_queue_empty(&info->xmit_queue)) {
1227 if (m->mdmreg[REG_DXMT] & BIT_DXMT) { 1227 if (m->mdmreg[REG_DXMT] & BIT_DXMT) {
1228 isdn_tty_senddown(info); 1228 isdn_tty_senddown(info);
1229 isdn_tty_tint(info); 1229 isdn_tty_tint(info);
@@ -1284,7 +1284,7 @@ isdn_tty_flush_chars(struct tty_struct *tty)
1284 1284
1285 if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_flush_chars")) 1285 if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_flush_chars"))
1286 return; 1286 return;
1287 if ((info->xmit_count) || (skb_queue_len(&info->xmit_queue))) 1287 if ((info->xmit_count) || !skb_queue_empty(&info->xmit_queue))
1288 isdn_timer_ctrl(ISDN_TIMER_MODEMXMIT, 1); 1288 isdn_timer_ctrl(ISDN_TIMER_MODEMXMIT, 1);
1289} 1289}
1290 1290
diff --git a/drivers/isdn/icn/icn.c b/drivers/isdn/icn/icn.c
index 9fc0c1e03732..e0d1b01cc74c 100644
--- a/drivers/isdn/icn/icn.c
+++ b/drivers/isdn/icn/icn.c
@@ -304,12 +304,12 @@ icn_pollbchan_send(int channel, icn_card * card)
304 isdn_ctrl cmd; 304 isdn_ctrl cmd;
305 305
306 if (!(card->sndcount[channel] || card->xskb[channel] || 306 if (!(card->sndcount[channel] || card->xskb[channel] ||
307 skb_queue_len(&card->spqueue[channel]))) 307 !skb_queue_empty(&card->spqueue[channel])))
308 return; 308 return;
309 if (icn_trymaplock_channel(card, mch)) { 309 if (icn_trymaplock_channel(card, mch)) {
310 while (sbfree && 310 while (sbfree &&
311 (card->sndcount[channel] || 311 (card->sndcount[channel] ||
312 skb_queue_len(&card->spqueue[channel]) || 312 !skb_queue_empty(&card->spqueue[channel]) ||
313 card->xskb[channel])) { 313 card->xskb[channel])) {
314 spin_lock_irqsave(&card->lock, flags); 314 spin_lock_irqsave(&card->lock, flags);
315 if (card->xmit_lock[channel]) { 315 if (card->xmit_lock[channel]) {