aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/n_gsm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/n_gsm.c')
-rw-r--r--drivers/char/n_gsm.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/char/n_gsm.c b/drivers/char/n_gsm.c
index c4161d5e053d..e4089c432f15 100644
--- a/drivers/char/n_gsm.c
+++ b/drivers/char/n_gsm.c
@@ -904,9 +904,7 @@ static void gsm_dlci_data_sweep(struct gsm_mux *gsm)
904 int len; 904 int len;
905 /* Priority ordering: We should do priority with RR of the groups */ 905 /* Priority ordering: We should do priority with RR of the groups */
906 int i = 1; 906 int i = 1;
907 unsigned long flags;
908 907
909 spin_lock_irqsave(&gsm->tx_lock, flags);
910 while (i < NUM_DLCI) { 908 while (i < NUM_DLCI) {
911 struct gsm_dlci *dlci; 909 struct gsm_dlci *dlci;
912 910
@@ -927,7 +925,6 @@ static void gsm_dlci_data_sweep(struct gsm_mux *gsm)
927 if (len == 0) 925 if (len == 0)
928 i++; 926 i++;
929 } 927 }
930 spin_unlock_irqrestore(&gsm->tx_lock, flags);
931} 928}
932 929
933/** 930/**
@@ -2230,12 +2227,16 @@ static int gsmld_open(struct tty_struct *tty)
2230static void gsmld_write_wakeup(struct tty_struct *tty) 2227static void gsmld_write_wakeup(struct tty_struct *tty)
2231{ 2228{
2232 struct gsm_mux *gsm = tty->disc_data; 2229 struct gsm_mux *gsm = tty->disc_data;
2230 unsigned long flags;
2233 2231
2234 /* Queue poll */ 2232 /* Queue poll */
2235 clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); 2233 clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
2236 gsm_data_kick(gsm); 2234 gsm_data_kick(gsm);
2237 if (gsm->tx_bytes < TX_THRESH_LO) 2235 if (gsm->tx_bytes < TX_THRESH_LO) {
2236 spin_lock_irqsave(&gsm->tx_lock, flags);
2238 gsm_dlci_data_sweep(gsm); 2237 gsm_dlci_data_sweep(gsm);
2238 spin_unlock_irqrestore(&gsm->tx_lock, flags);
2239 }
2239} 2240}
2240 2241
2241/** 2242/**