serial_stream_detect: Make read nonblocking.

This code implements its own waiting based on baudrate, so the read itself
should be nonblocking. In general it will have been already, since drivers
almost universally use the SERIAL_NONBLOCK flag.
This commit is contained in:
Martin Ling 2014-09-21 21:26:36 +01:00 committed by Uwe Hermann
parent 2fe6210af6
commit 18e4d5bc45
1 changed files with 1 additions and 1 deletions

View File

@ -618,7 +618,7 @@ SR_PRIV int serial_stream_detect(struct sr_serial_dev_inst *serial,
i = ibuf = len = 0;
while (ibuf < maxlen) {
len = serial_read(serial, &buf[ibuf], 1);
len = serial_read_nonblocking(serial, &buf[ibuf], 1);
if (len > 0) {
ibuf += len;
} else if (len == 0) {