termios: Simplify rtems_termios_read_tty()

Remove dead code.

Update #2914.
This commit is contained in:
Sebastian Huber
2017-02-23 09:12:36 +01:00
parent 17f81ee3cb
commit 35a3d81581

View File

@@ -1402,7 +1402,7 @@ siproc (unsigned char c, struct rtems_termios_tty *tty)
/* /*
* Fill the input buffer by polling the device * Fill the input buffer by polling the device
*/ */
static rtems_status_code static void
fillBufferPoll (struct rtems_termios_tty *tty) fillBufferPoll (struct rtems_termios_tty *tty)
{ {
int n; int n;
@@ -1449,13 +1449,12 @@ fillBufferPoll (struct rtems_termios_tty *tty)
} }
} }
} }
return RTEMS_SUCCESSFUL;
} }
/* /*
* Fill the input buffer from the raw input queue * Fill the input buffer from the raw input queue
*/ */
static rtems_status_code static void
fillBufferQueue (struct rtems_termios_tty *tty) fillBufferQueue (struct rtems_termios_tty *tty)
{ {
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
@@ -1517,7 +1516,6 @@ fillBufferQueue (struct rtems_termios_tty *tty)
break; break;
} }
} }
return RTEMS_SUCCESSFUL;
} }
rtems_status_code rtems_status_code
@@ -1544,12 +1542,9 @@ rtems_termios_read (void *arg)
tty->cindex = tty->ccount = 0; tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column; tty->read_start_column = tty->column;
if (tty->handler.poll_read != NULL && tty->handler.mode == TERMIOS_POLLED) if (tty->handler.poll_read != NULL && tty->handler.mode == TERMIOS_POLLED)
sc = fillBufferPoll (tty); fillBufferPoll (tty);
else else
sc = fillBufferQueue (tty); fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
} }
while (count && (tty->cindex < tty->ccount)) { while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++]; *buffer++ = tty->cbuf[tty->cindex++];