Loading drivers/staging/dgap/dgap.c +77 −71 Original line number Diff line number Diff line Loading @@ -576,7 +576,10 @@ static int dgap_start(void) dgap_driver_start = TRUE; /* make sure that the globals are init'd before we do anything else */ /* * make sure that the globals are * init'd before we do anything else */ dgap_init_globals(); dgap_NumBoards = 0; Loading Loading @@ -1847,8 +1850,10 @@ static void dgap_input(struct channel_t *ch) * If the device is not open, or CREAD is off, flush * input data and return immediately. */ if ((bd->state != BOARD_READY) || !tp || (tp->magic != TTY_MAGIC) || !(ch->ch_tun.un_flags & UN_ISOPEN) || !(tp->termios.c_cflag & CREAD) || if ((bd->state != BOARD_READY) || !tp || (tp->magic != TTY_MAGIC) || !(ch->ch_tun.un_flags & UN_ISOPEN) || !(tp->termios.c_cflag & CREAD) || (ch->ch_tun.un_flags & UN_CLOSING)) { writew(head, &(bs->rx_tail)); Loading Loading @@ -2848,7 +2853,8 @@ static int dgap_tty_write_room(struct tty_struct *tty) head = readw(&(bs->tx_head)) & tmask; tail = readw(&(bs->tx_tail)) & tmask; if ((ret = tail - head - 1) < 0) ret = tail - head - 1; if (ret < 0) ret += ch->ch_tsize; /* Limit printer to maxcps */ Loading Loading
drivers/staging/dgap/dgap.c +77 −71 Original line number Diff line number Diff line Loading @@ -576,7 +576,10 @@ static int dgap_start(void) dgap_driver_start = TRUE; /* make sure that the globals are init'd before we do anything else */ /* * make sure that the globals are * init'd before we do anything else */ dgap_init_globals(); dgap_NumBoards = 0; Loading Loading @@ -1847,8 +1850,10 @@ static void dgap_input(struct channel_t *ch) * If the device is not open, or CREAD is off, flush * input data and return immediately. */ if ((bd->state != BOARD_READY) || !tp || (tp->magic != TTY_MAGIC) || !(ch->ch_tun.un_flags & UN_ISOPEN) || !(tp->termios.c_cflag & CREAD) || if ((bd->state != BOARD_READY) || !tp || (tp->magic != TTY_MAGIC) || !(ch->ch_tun.un_flags & UN_ISOPEN) || !(tp->termios.c_cflag & CREAD) || (ch->ch_tun.un_flags & UN_CLOSING)) { writew(head, &(bs->rx_tail)); Loading Loading @@ -2848,7 +2853,8 @@ static int dgap_tty_write_room(struct tty_struct *tty) head = readw(&(bs->tx_head)) & tmask; tail = readw(&(bs->tx_tail)) & tmask; if ((ret = tail - head - 1) < 0) ret = tail - head - 1; if (ret < 0) ret += ch->ch_tsize; /* Limit printer to maxcps */ Loading