Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

serial: bfin-uart: remove redundant CTS check for hardware CTS control.

Blackfin hardware CTS control generate interrupt for both CTS on and off.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Sonic Zhang and committed by
Greg Kroah-Hartman
f5b6940c ee948e37

+1 -23
+1 -23
drivers/tty/serial/bfin_uart.c
··· 119 119 unsigned int status; 120 120 121 121 status = bfin_serial_get_mctrl(&uart->port); 122 - uart_handle_cts_change(&uart->port, status & TIOCM_CTS); 123 122 #ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS 124 - uart->scts = 1; 125 123 UART_CLEAR_SCTS(uart); 126 - UART_CLEAR_IER(uart, EDSSI); 127 124 #endif 125 + uart_handle_cts_change(&uart->port, status & TIOCM_CTS); 128 126 129 127 return IRQ_HANDLED; 130 128 } ··· 172 174 { 173 175 struct bfin_serial_port *uart = (struct bfin_serial_port *)port; 174 176 struct tty_struct *tty = uart->port.state->port.tty; 175 - 176 - #ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS 177 - if (uart->scts && !(bfin_serial_get_mctrl(&uart->port) & TIOCM_CTS)) { 178 - uart->scts = 0; 179 - uart_handle_cts_change(&uart->port, uart->scts); 180 - } 181 - #endif 182 177 183 178 /* 184 179 * To avoid losting RX interrupt, we reset IR function ··· 371 380 { 372 381 struct bfin_serial_port *uart = dev_id; 373 382 374 - #ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS 375 - if (uart->scts && !(bfin_serial_get_mctrl(&uart->port) & TIOCM_CTS)) { 376 - uart->scts = 0; 377 - uart_handle_cts_change(&uart->port, uart->scts); 378 - } 379 - #endif 380 383 spin_lock(&uart->port.lock); 381 384 if (UART_GET_LSR(uart) & THRE) 382 385 bfin_serial_tx_chars(uart); ··· 515 530 { 516 531 struct bfin_serial_port *uart = dev_id; 517 532 struct circ_buf *xmit = &uart->port.state->xmit; 518 - 519 - #ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS 520 - if (uart->scts && !(bfin_serial_get_mctrl(&uart->port)&TIOCM_CTS)) { 521 - uart->scts = 0; 522 - uart_handle_cts_change(&uart->port, uart->scts); 523 - } 524 - #endif 525 533 526 534 spin_lock(&uart->port.lock); 527 535 if (!(get_dma_curr_irqstat(uart->tx_dma_channel)&DMA_RUN)) {