diff options
author | Serge Semin <fancer.lancer@gmail.com> | 2019-05-14 13:14:15 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-05-21 12:15:54 +0200 |
commit | 9c12d739d69b80847e99d24692ff20de993bf172 (patch) | |
tree | 3b1dec44d8d0350c74cd50073d6f0abc2089fc3b /.cocciconfig | |
parent | 2b9e6f0a400b6be1a408cd63ed09cfeb8f5dd627 (diff) |
tty: max310x: Split uart characters insertion loop
Batch read mode doesn't check any conditions or flags except the Rx
overflow one. But it may only happen after the last character is pushed
into the RHR register. In this case we shouldn't push all the read
characters with overrun flag set, but only the last one caused the
FIFO overflow. This commit splits the characters retrieval loop into
two parts. First one is ordinary intsert-chars procedure without taking
the overrun status into account. Second part inserts the last character
checking whether the overrun happened and pushing a '\0' character with
TTY_OVERRUN flag to a flip-buffer.
If we left the loop the way it was the '\0' character would be inserted
after each character retrieved at the overrun occasion.
Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to '.cocciconfig')
0 files changed, 0 insertions, 0 deletions