aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/synclinkmp.c
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2013-01-03 09:53:03 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-16 01:21:36 -0500
commit92a19f9cec9a80ad93c06e115822deb729e2c6ad (patch)
tree80e1550ac1647a1cdf20a0b568554c0c50a63f75 /drivers/tty/synclinkmp.c
parent2f69335710884ae6112fc8196ebe29b5cda7b79b (diff)
TTY: switch tty_insert_flip_char
Now, we start converting tty buffer functions to actually use tty_port. This will allow us to get rid of the need of tty in many call sites. Only tty_port will needed and hence no more tty_port_tty_get in those paths. tty_insert_flip_char is the next one to proceed. This one is used all over the code, so the patch is huge. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/synclinkmp.c')
-rw-r--r--drivers/tty/synclinkmp.c42
1 files changed, 18 insertions, 24 deletions
diff --git a/drivers/tty/synclinkmp.c b/drivers/tty/synclinkmp.c
index 33b7314cc6c7..f5794f3d840f 100644
--- a/drivers/tty/synclinkmp.c
+++ b/drivers/tty/synclinkmp.c
@@ -2131,13 +2131,11 @@ static void isr_rxint(SLMP_INFO * info)
2131 /* process break detection if tty control 2131 /* process break detection if tty control
2132 * is not set to ignore it 2132 * is not set to ignore it
2133 */ 2133 */
2134 if ( tty ) { 2134 if (!(status & info->ignore_status_mask1)) {
2135 if (!(status & info->ignore_status_mask1)) { 2135 if (info->read_status_mask1 & BRKD) {
2136 if (info->read_status_mask1 & BRKD) { 2136 tty_insert_flip_char(&info->port, 0, TTY_BREAK);
2137 tty_insert_flip_char(tty, 0, TTY_BREAK); 2137 if (tty && (info->port.flags & ASYNC_SAK))
2138 if (info->port.flags & ASYNC_SAK) 2138 do_SAK(tty);
2139 do_SAK(tty);
2140 }
2141 } 2139 }
2142 } 2140 }
2143 } 2141 }
@@ -2202,26 +2200,22 @@ static void isr_rxrdy(SLMP_INFO * info)
2202 2200
2203 status &= info->read_status_mask2; 2201 status &= info->read_status_mask2;
2204 2202
2205 if ( tty ) { 2203 if (status & PE)
2206 if (status & PE) 2204 flag = TTY_PARITY;
2207 flag = TTY_PARITY; 2205 else if (status & FRME)
2208 else if (status & FRME) 2206 flag = TTY_FRAME;
2209 flag = TTY_FRAME; 2207 if (status & OVRN) {
2210 if (status & OVRN) { 2208 /* Overrun is special, since it's
2211 /* Overrun is special, since it's 2209 * reported immediately, and doesn't
2212 * reported immediately, and doesn't 2210 * affect the current character
2213 * affect the current character 2211 */
2214 */ 2212 over = true;
2215 over = true;
2216 }
2217 } 2213 }
2218 } /* end of if (error) */ 2214 } /* end of if (error) */
2219 2215
2220 if ( tty ) { 2216 tty_insert_flip_char(&info->port, DataByte, flag);
2221 tty_insert_flip_char(tty, DataByte, flag); 2217 if (over)
2222 if (over) 2218 tty_insert_flip_char(&info->port, 0, TTY_OVERRUN);
2223 tty_insert_flip_char(tty, 0, TTY_OVERRUN);
2224 }
2225 } 2219 }
2226 2220
2227 if ( debug_level >= DEBUG_LEVEL_ISR ) { 2221 if ( debug_level >= DEBUG_LEVEL_ISR ) {