瀏覽代碼

serial: jsm: Replace magic value with the proper define

The changed function flushes the tx UART and the '4' corresponds to the
UART_FCR_CLEAR_XMIT value. This commit replaces the magic number with
this define.

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Konrad Zapalowicz 10 年之前
父節點
當前提交
5b05e2cbf5
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/tty/serial/jsm/jsm_neo.c

+ 1 - 1
drivers/tty/serial/jsm/jsm_neo.c

@@ -644,7 +644,7 @@ static void neo_flush_uart_write(struct jsm_channel *ch)
 
 
 		/* Check to see if the UART feels it completely flushed the FIFO. */
 		/* Check to see if the UART feels it completely flushed the FIFO. */
 		tmp = readb(&ch->ch_neo_uart->isr_fcr);
 		tmp = readb(&ch->ch_neo_uart->isr_fcr);
-		if (tmp & 4) {
+		if (tmp & UART_FCR_CLEAR_XMIT) {
 			jsm_dbg(IOCTL, &ch->ch_bd->pci_dev,
 			jsm_dbg(IOCTL, &ch->ch_bd->pci_dev,
 				"Still flushing TX UART... i: %d\n", i);
 				"Still flushing TX UART... i: %d\n", i);
 			udelay(10);
 			udelay(10);