diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2014-03-20 08:09:19 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2014-03-20 08:13:50 +0200 |
commit | 17d5ca91cfc59ae91da5ff9da74ab09a9a2a17d9 (patch) | |
tree | a45f944e15a2600ec20ca4ec11b23d4641095e8e /drivers/tty/n_gsm.c | |
parent | b7e4ab50418d5b34ab0dae95193dd71190e1fb50 (diff) | |
parent | c86907b59f505863ec7839471e889330982a596e (diff) | |
download | talos-op-linux-17d5ca91cfc59ae91da5ff9da74ab09a9a2a17d9.tar.gz talos-op-linux-17d5ca91cfc59ae91da5ff9da74ab09a9a2a17d9.zip |
Merge branch '3.15/dss-dt' into 3.15/fbdev
Merge OMAP DSS DT support
Diffstat (limited to 'drivers/tty/n_gsm.c')
-rw-r--r-- | drivers/tty/n_gsm.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index f34461c5f14e..2ebe47b78a3e 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c @@ -1090,6 +1090,7 @@ static void gsm_control_modem(struct gsm_mux *gsm, u8 *data, int clen) { unsigned int addr = 0; unsigned int modem = 0; + unsigned int brk = 0; struct gsm_dlci *dlci; int len = clen; u8 *dp = data; @@ -1116,6 +1117,16 @@ static void gsm_control_modem(struct gsm_mux *gsm, u8 *data, int clen) if (len == 0) return; } + len--; + if (len > 0) { + while (gsm_read_ea(&brk, *dp++) == 0) { + len--; + if (len == 0) + return; + } + modem <<= 7; + modem |= (brk & 0x7f); + } tty = tty_port_tty_get(&dlci->port); gsm_process_modem(tty, dlci, modem, clen); if (tty) { |